Limit SSCT WAL Check on Perf Standbys to Raft Backends Only (#15879)

* ensure that ssct wal check only occurs for non-raft storage on perf standbys

* changelog
This commit is contained in:
Hridoy Roy
2022-06-08 13:58:22 -07:00
committed by GitHub
parent 9419b96607
commit 12bce35246
2 changed files with 9 additions and 0 deletions

3
changelog/15879.txt Normal file
View File

@@ -0,0 +1,3 @@
```release-note:bug
core: Limit SSCT WAL checks on perf standbys to raft backends only
```

View File

@@ -1945,6 +1945,12 @@ func (c *Core) checkSSCTokenInternal(ctx context.Context, token string, isPerfSt
if err != nil {
return "", err
}
// Disregard SSCT on perf-standbys for non-raft storage
if c.perfStandby && c.getRaftBackend() == nil {
return plainToken.Random, nil
}
ep := int(plainToken.IndexEpoch)
if ep < c.tokenStore.GetSSCTokensGenerationCounter() {
return plainToken.Random, nil