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

cbgt: failover entries with invalid vbucket uuid will create infinite rollback loop

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.6.2
    • 7.6.0
    • cbgt, fts
    • None
    • Untriaged
    • 0
    • Unknown

    Description

      When cbgt is running a rollback, it will use failover logs to determine the next valid point in the the failover logs to rollback to using:

      	var rollbackVbuuid uint64
      	vbMetaData, _, err := f.getMetaData(vbId)
      	if err == nil && len(vbMetaData.FailOverLog) > 0 {
      		for j := 0; j < len(vbMetaData.FailOverLog); j++ {
      			if vbMetaData.FailOverLog[j][1] <= rollbackSeqno {
      				rollbackVbuuid = vbMetaData.FailOverLog[j][0]
      				break
      			}
      		}
      	}
      

      If vbMetaData.FailOverLog contains

      {bad vbuuid, 0}

      , as it might if the failover log came from a different bucket, this will cause a rollback loop since each time since OpenStream would call startSeq=0, vbUUID=bad vbuuid. In this case the server will issue a rollback due to memd.DcpStreamAddFlagStrictVBUUID.

      A fix would be to not set rollbackVbuuid when the rollbackSeqNo is 0.

      if vbMetaData.FailOverLog[j][1] <= rollbackSeqno && vbMetaData.FailOverLog[j][i] != 0 {
      

      Attachments

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

        Activity

          People

            abhinav Abhi Dangeti
            tor.colvin Tor Colvin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty