Caideyipi opened a new pull request, #18910:
URL: https://github.com/apache/iotdb/pull/18910

   ## Description
   
   DataNodes can admit a creation batch that exceeds the timeseries quota when 
the ConfigNode's usage count lags local creation. Send the total quota and 
cluster usage in optional heartbeat fields, and cache them together with the 
local usage that counts toward quota.
   
   Check `max(localCount, lastClusterCount) + requestedCount > totalQuota` 
through the shared schema quota entry points in `RegionWriteExecutor`, before 
`consensus.write`. Reject oversized requests with the existing 
`SCHEMA_QUOTA_EXCEEDED` status and message, while allowing an exact fit. Keep 
unlimited quotas and compatibility with older ConfigNodes that only send 
remaining quota.
   
   For Ratis creation, filter existing measurements before reserving quota. 
Check and reserve an entire batch, including template activation, together so a 
rejected batch cannot leave partial device or measurement reservations.
   
   ## Validation
   
   - Full-reactor English build and 34 tests across 
`DataNodeSchemaQuotaManagerTest`, `RegionWriteExecutorTest`, 
`DataNodeInternalRPCServiceImplTest`, and `ClusterSchemaManagerTest`: passed.
   - Full-reactor `mvn test-compile -P with-zh-locale -DskipTests`: passed.
   - Spotless, Checkstyle for the changed modules, and `git diff --check`: 
passed.
   
   The tests cover stale cluster counts, local counts, exact limits, oversized 
batches, concurrent creation, quota refresh and rollback, legacy heartbeats, 
and refusal before any consensus write. The RPC test also verifies consecutive 
creation requests between heartbeats.
   


-- 
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]

Reply via email to