Details
-
Bug
-
Resolution: Fixed
-
Major
-
7.0.0
-
Untriaged
-
1
-
Unknown
Description
The issue was spotted by Srinath.
Looking at the mvcc_purger code, I have a question.
case <-s.purgerCh:
if time.Duration(time.Now().UnixNano()-lastPurgerTime) > purgerInterval {
purgeRatio := s.GetStats().MVCCPurgeRatio ctx := s.newWCtx()
if s.Config.PurgeThreshold > 0 &&
purgeRatio > s.Config.PurgeThreshold &&
atomic.CompareAndSwapInt32(&s.isPurgerRunning, 0, 1) &&
doProceed(ctx)
s.releaseWCtx2(ctx)
lastPurgerTime = time.Now().UnixNano()
}if atomic.CompareAndSwapInt32(&s.isPurgerRunning, 0, 1) succeeds and doProceed(ctx) fails, we are not resetting isPurgerRunning to 0. So, further calls to purge will not happen.
Attachments
Issue Links
- is a backport of
-
MB-48325 MVCCPurger may stop running if doProceed check fails
- Closed