michaelsembwever commented on code in PR #4415:
URL: https://github.com/apache/cassandra/pull/4415#discussion_r2507043558
##########
src/java/org/apache/cassandra/utils/memory/MemtablePool.java:
##########
@@ -152,14 +152,12 @@ private boolean updateNextClean()
boolean tryAllocate(long size)
{
- while (true)
- {
- long cur;
- if ((cur = allocated) + size > limit)
- return false;
- if (allocatedUpdater.compareAndSet(this, cur, cur + size))
- return true;
+ long result = allocatedUpdater.addAndGet(this, size);
+ if (result > limit) { // TODO: ensure that clean logic is not
broken if allocated value can be dynamically more than a limit
Review Comment:
`TODO` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]