Fix a performance bug in Resolver
The erased bytes from recent state transactions was accidently set to 0 and cause anyPopped to be always false. Thus, when totalStateBytes will never decrease and can cause high latency between "Resolver.resolveBatch.Before" and "Resolver.resolveBatch.AfterQueueSizeCheck", in hundreds of milliseconds. This will cause high server side commit latency.
This commit is contained in:
parent
1e8feb9cb8
commit
4103b16793
|
@ -409,7 +409,7 @@ ACTOR Future<Void> resolveBatch(Reference<Resolver> self, ResolveTransactionBatc
|
|||
TEST(true); // Deleting old state transactions
|
||||
int64_t erasedBytes = self->recentStateTransactionsInfo.eraseUpTo(oldestProxyVersion);
|
||||
self->debugMinRecentStateVersion = oldestProxyVersion + 1;
|
||||
anyPopped = erasedBytes = 0;
|
||||
anyPopped = erasedBytes > 0;
|
||||
stateBytes -= erasedBytes;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue