- Setup 6.6.5 node
- Rebalance in >= 7.0.2 node
- Bootstrap memcached connection and try to get cluster config from the upgraded node
- The get fails with status 1 (key not found)
This issue was introduced in 7.0.2 when introducing
The issue is that ns_server sends a -1 epoch when cluster compat is < 7.0. When kv_engine handles the get cluster config here, maybeGetConfiguration checks if the passed in version is less than the active version here. If so, it returns a config. It was assumed that supplying 0s for this arg would always return true however the introduction of -1 broke this assumption.
This code compares the actual epoch (-1) with the default epoch (0) and 0 is not less than -1 so no config is returned which ultimately returns an empty unique_ptr which fails the if branch here and returns KeyEnoent
This diff fixed the issue for me although the fix probably needs to be more robust