Caideyipi commented on PR #18202: URL: https://github.com/apache/iotdb/pull/18202#issuecomment-5054734366
I pushed a focused regression test, `testReadAndWriteUsageAreIsolated`, in commit [`456e6d6bd72`](https://github.com/apache/iotdb/pull/18202/commits/456e6d6bd72). The test configures READ and WRITE CPU quotas independently with `max=1`, acquires one WRITE token, and then attempts to acquire one READ token. The READ acquisition is incorrectly rejected: ``` java.lang.AssertionError: Read quota should not include CPU already acquired by writes ``` Reproduction command: ``` mvn -pl iotdb-core/datanode -Dtest=CapacityResourceLimiterTest#testReadAndWriteUsageAreIsolated -DfailIfNoTests=false test ``` The root cause appears to be that `NodeQuotaState` stores usage and ranges only by user, while `UserResourceQuotaManager.getInUse(..., op, ...)` ignores `op`. `refreshNodeRanges()` also writes both READ and WRITE ranges into the same per-user state. Node total capacity can remain shared, but per-user usage/ranges need to be isolated by `(user, operation)`. -- 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]
