watching the metadataVersionKey does not require ACCESS_SYSTEM_KEYS, this is not api versioned, as it is harmless to allow this for older api versions

This commit is contained in:
Evan Tschannen 2019-03-10 21:19:35 -07:00
parent 2627bcd35e
commit 98bf4ddf28
1 changed files with 1 additions and 1 deletions

View File

@ -1678,7 +1678,7 @@ Future<Void> ReadYourWritesTransaction::watch(const Key& key) {
if( options.readYourWritesDisabled )
return watches_disabled();
if(key >= allKeys.end || (key >= getMaxReadKey() && tr.apiVersionAtLeast(300)))
if(key >= allKeys.end || (key >= getMaxReadKey() && key != metadataVersionKey && tr.apiVersionAtLeast(300)))
return key_outside_legal_range();
if (key.size() > (key.startsWith(systemKeys.begin) ? CLIENT_KNOBS->SYSTEM_KEY_SIZE_LIMIT : CLIENT_KNOBS->KEY_SIZE_LIMIT))