xingtanzjr commented on code in PR #9596:
URL: https://github.com/apache/iotdb/pull/9596#discussion_r1164930395


##########
confignode/src/main/java/org/apache/iotdb/confignode/manager/ClusterQuotaManager.java:
##########
@@ -107,9 +107,16 @@ private boolean checkSpaceQuota(TSetSpaceQuotaReq req) {
     for (String database : req.getDatabase()) {
       if (quotaInfo.getSpaceQuotaLimit().containsKey(database)) {
         TSpaceQuota spaceQuota = quotaInfo.getSpaceQuotaUsage().get(database);
-        if (spaceQuota.getDeviceNum() > req.getSpaceLimit().getDeviceNum()
-            || spaceQuota.getTimeserieNum() > 
req.getSpaceLimit().getTimeserieNum()
-            || spaceQuota.getDiskSize() > req.getSpaceLimit().getDiskSize()) {
+        if (req.getSpaceLimit().getDeviceNum() != -1

Review Comment:
   What does `-1` means ? Suggest to use static const with a explicit meaning.



##########
confignode/src/main/java/org/apache/iotdb/confignode/manager/ClusterQuotaManager.java:
##########
@@ -107,9 +107,16 @@ private boolean checkSpaceQuota(TSetSpaceQuotaReq req) {
     for (String database : req.getDatabase()) {
       if (quotaInfo.getSpaceQuotaLimit().containsKey(database)) {
         TSpaceQuota spaceQuota = quotaInfo.getSpaceQuotaUsage().get(database);
-        if (spaceQuota.getDeviceNum() > req.getSpaceLimit().getDeviceNum()
-            || spaceQuota.getTimeserieNum() > 
req.getSpaceLimit().getTimeserieNum()
-            || spaceQuota.getDiskSize() > req.getSpaceLimit().getDiskSize()) {
+        if (req.getSpaceLimit().getDeviceNum() != -1

Review Comment:
   What does `-1` means ? Suggest to use static const with an explicit meaning.



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