docs: void updateMembers(MembersView membersView) {
          MemberMap currentMemberMap = memberMapRef.get();
  
          Collection<MemberImpl> addedMembers = new LinkedList<>();
          Collection<MemberImpl> removedMembers = new LinkedList<>();
          ClusterHeartbeatManager clusterHeartbeatManager = clusterService.getClusterHeartbeatManager();
  
          MemberImpl[] members = new MemberImpl[membersView.size()];
          int memberIndex = 0;
          for (MemberInfo memberInfo : membersView.getMembers()) {
              Address address = memberInfo.getAddress();
              MemberImpl member = currentMemberMap.getMember(address);
  
              if (member != null && member.getUuid().equals(memberInfo.getUuid())) {
                  member = createNewMemberImplIfChanged(memberInfo, member);
                  members[memberIndex++] = member;
                  continue;
              }
  
              if (member != null) {
                  assert !(member.localMember() && member.equals(clusterService.getLocalMember()))
                          : "Local " + member + " cannot be replaced with " + memberInfo;
  
                  // UUID changed: means member has gone and come back with a new uuid
                  removedMembers.add(member);
              }
  
              member = createMember(memberInfo, memberInfo.getAttributes());
              addedMembers.add(member);
  
              long now = clusterService.getClusterTime();
              clusterHeartbeatManager.onHeartbeat(member, now);
  
              repairPartitionTableIfReturningMember(member);
              members[memberIndex++] = member;
          }
  
          MemberMap newMemberMap = membersView.toMemberMap();
          for (MemberImpl member : currentMemberMap.getMembers()) {
              if (!newMemberMap.contains(member.getAddress())) {
                  removedMembers.add(member);
              }
          }
  
          setMembers(MemberMap.createNew(membersView.getVersion(), members));
  
          for (MemberImpl member : removedMembers) {
              closeConnection(member.getAddress(), "Member left event received from master");
              handleMemberRemove(memberMapRef.get(), member);
          }
  
          clusterService.getClusterJoinManager().insertIntoRecentlyJoinedMemberSet(addedMembers);
          sendMembershipEvents(currentMemberMap.getMembers(), addedMembers);
  
          removeFromMissingMembers(members);
  
          clusterHeartbeatManager.heartbeat();
          clusterService.printMemberList();
  
          //async call
          node.getNodeExtension().scheduleClusterVersionAutoUpgrade();
      }