Skip to content

Commit

Permalink
MB-31938 wait for stream request to finish before merge
Browse files Browse the repository at this point in the history
Change-Id: Iab0e5754061d5b1ec9f7a39a669fd7469cab22d0
  • Loading branch information
deepkaran authored and Deepkaran Salooja committed May 14, 2020
1 parent 3d49b9a commit e161584
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions secondary/indexer/timekeeper.go
Expand Up @@ -2049,6 +2049,11 @@ func (tk *timekeeper) flushOrAbortInProgressTS(streamId common.StreamId,
func (tk *timekeeper) checkInitialBuildDone(streamId common.StreamId,
keyspaceId string, flushTs *common.TsVbuuid) bool {

//TODO Collections - verify this. wait for stream request to be done
if ts, ok := tk.ss.streamKeyspaceIdOpenTsMap[streamId][keyspaceId]; !ok || ts == nil {
return false
}

for _, buildInfo := range tk.indexBuildInfo {

if buildInfo.waitForRecovery {
Expand Down Expand Up @@ -2160,6 +2165,7 @@ func (tk *timekeeper) checkInitStreamReadyToMerge(streamId common.StreamId,
}

//INIT_STREAM cannot be merged to MAINT_STREAM if its not ACTIVE
//TODO Collections - Is this message required in CC?
if tk.ss.streamKeyspaceIdStatus[common.MAINT_STREAM][keyspaceId] != STREAM_ACTIVE {
logging.Infof("Timekeeper::checkInitStreamReadyToMerge MAINT_STREAM in %v. "+
"INIT_STREAM cannot be merged. Continue both streams for keyspaceId %v.",
Expand Down

0 comments on commit e161584

Please sign in to comment.