Load SSCT Generation Counter Upon DR Promotion [OSS] (#16956)
* port ssct bugfix to load epoch from storage * changelog * update changelog to be user-facing * change 2 to two
This commit is contained in:
parent
9b6dfa4194
commit
8e7fec59ef
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
core: Prevent two or more DR failovers from invalidating SSCT tokens generated on the previous primaries.
|
||||
```
|
|
@ -38,6 +38,9 @@ func (ts *TokenStore) loadSSCTokensGenerationCounter(ctx context.Context) error
|
|||
}
|
||||
|
||||
func (ts *TokenStore) UpdateSSCTokensGenerationCounter(ctx context.Context) error {
|
||||
if err := ts.loadSSCTokensGenerationCounter(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
ts.sscTokensGenerationCounter.Counter += 1
|
||||
if ts.sscTokensGenerationCounter.Counter <= 0 {
|
||||
// Don't store the 0 value
|
||||
|
|
Loading…
Reference in New Issue