code: private long completeAssignment(String streamSegmentName, long streamSegmentId) {
          assert streamSegmentId != ContainerMetadata.NO_STREAM_SEGMENT_ID : "no valid streamSegmentId given";
          finishPendingRequests(streamSegmentName, PendingRequest::complete, streamSegmentId);
          return streamSegmentId;
      }
docs: Completes the assignment for the given StreamSegmentName by completing the waiting CompletableFuture.