Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-55218

[BP to 7.2] Use streamId instead of index.Stream to determine stream catchup pending

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown

    Description

      In indexer::checkCatchupPendingForStream, indexer should check the keyspaceId for the stream that is passed through and not the stream of the index. Otherwise, the index.Defn.KeyspaceId(index.Stream) will fail and indexer will not start the MAINT_STREAM

      func (idx *indexer) checkCatchupPendingForStream(streamId common.StreamId,
      	keyspaceId string) bool {
       
      	//catch is only possible for MAINT_STREAM
      	if streamId != common.MAINT_STREAM {
      		return false
      	}
       
      	//check if any index of the given keyspaceId is in the Stream
      	for _, index := range idx.indexInstMap {
       
      		if index.Defn.KeyspaceId(index.Stream) == keyspaceId && index.Stream == common.INIT_STREAM &&
      			index.State == common.INDEX_STATE_CATCHUP {
      			return true
      		}
      	}
       
      	return false
      }
      

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sai.teja Sai Krishna Teja
            amit.kulkarni Amit Kulkarni
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty