Skip to content

Conversation

@captainzmc
Copy link
Member

What changes were proposed in this pull request?

Currently MAX_QUOTA_IN_BYTES is 1EB, which is not very exact. Later we need use this to determine whether quota is enabled or not.
We need to change it to long.max_value to be consistent with HDFS.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-4129

How was this patch tested?

Existing UT

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about volumes created before this change with the previous max. value? Will those be treated by new version as if quota had been enabled for them?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for @adoroszlai 's discussion. Yes, the previous volume will enable quota. So I created JIRA HDDS-4106, which supports user Clearing spaceQuota.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest add new logic during OM startup to reset existing Volume max quota value to mitigate the compatibility issue.

Copy link
Contributor

@ChenSammi ChenSammi Aug 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I double checked HDFS implementation,it doesn't use LONG.MAX_VALUE to verify whether quota is enabled or not. It use "-1" which is more reasonable for a set/unset check.

Copy link
Member Author

@captainzmc captainzmc Aug 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks sammi for the discussion. It is indeed uncommon to use the maximum value to determine whether to enable quota, and it is more common to use -1 to determine. Later I will confirm whether to enable quota with -1 in HDDS-3727. The MAX_QUOTA_IN_BYTES here will be used to determine if the parameter values for setquota and updatequota are reasonable in HDDS-3725.

@bharatviswa504
Copy link
Contributor

Closing this as HDDS-4089 planning to fix this issue to make ACL commands work with the external authorizer.

@captainzmc
Copy link
Member Author

Closing this as HDDS-4089 planning to fix this issue to make ACL commands work with the external authorizer.

Hi @bharatviswa504 , I think this change has nothing to do with ACL commands. Is it something I don't understand?

@adoroszlai
Copy link
Contributor

Closing this as HDDS-4089 planning to fix this issue to make ACL commands work with the external authorizer.

Hi @bharatviswa504 , I think this change has nothing to do with ACL commands. Is it something I don't understand?

@captainzmc I think you can ignore it, the comment was intended for another PR: #1271 (comment)

@bharatviswa504
Copy link
Contributor

Sorry, @captainzmc I have posted the comment on the wrong PR. I was trying to search where I have posted, not able to figure out. You can ignore my comment.

@captainzmc
Copy link
Member Author

captainzmc commented Sep 4, 2020

Hi @ChenSammi , I had added the initialization and change the old volume quota default value to -1 when OM starts. Could you help review this PR again?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a UT for this function?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the corresponding UT has been added.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why omVolumeArgs.getQuotaInBytes() == OzoneConsts.MAX_QUOTA_IN_BYTES check is required here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This judgment is redundant, will delete it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate ","

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is one risk here, if user set the quota to 1EB specifically, we cann't reset it to -1 on next OM restart.

Copy link
Member Author

@captainzmc captainzmc Sep 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, the way to determine the old quota is by seeing whether his quota is 1 EB. So 1EB is still a special value. At present, OZone's cluster size is not large, far from the upper limit of 1EB.
So can we ignore this case? In addition, I adjust the LOG level from INFO to Warn (I can change it to ERROR if needed) to alert the user that the corresponding quota has been changed.

@captainzmc
Copy link
Member Author

Thanks for Sammi's review, fixed review issues. @ChenSammi Could you help take another look?

@captainzmc captainzmc closed this Sep 10, 2020
@captainzmc captainzmc reopened this Sep 10, 2020
@ChenSammi
Copy link
Contributor

+1. After a thoroughly thinking, we choose a conservative way.

Thanks @captainzmc for the contribution and @adoroszlai for the review.

@ChenSammi ChenSammi merged commit 04ac1ef into apache:master Sep 11, 2020
llemec pushed a commit to llemec/hadoop-ozone that referenced this pull request Sep 15, 2020
errose28 added a commit to errose28/ozone that referenced this pull request Sep 18, 2020
* master: (47 commits)
  HDDS-4104. Provide a way to get the default value and key of java-based-configuration easily (apache#1369)
  HDDS-4250. Fix wrong logger name (apache#1429)
  HDDS-4244. Container deleted wrong replica cause mis-replicated. (apache#1423)
  HDDS-4053. Volume space: add quotaUsageInBytes and update it when write and delete key. (apache#1296)
  HDDS-4210. ResolveBucket during checkAcls fails. (apache#1398)
  HDDS-4075. Retry request on different OM on AccessControlException (apache#1303)
  HDDS-4166. Documentation index page redirects to the wrong address (apache#1372)
  HDDS-4039. Reduce the number of fields in hdds.proto to improve performance (apache#1289)
  HDDS-4155. Directory and filename can end up with same name in a path. (apache#1361)
  HDDS-3927. Rename Ozone OM,DN,SCM runtime options to conform to naming conventions (apache#1401)
  HDDS-4119. Improve performance of the BufferPool management of Ozone client (apache#1336)
  HDDS-4217.Remove test TestOzoneContainerRatis (apache#1408)
  HDDS-4218.Remove test TestRatisManager (apache#1409)
  HDDS-4129. change MAX_QUOTA_IN_BYTES to Long.MAX_VALUE. (apache#1337)
  HDDS-4228: add field 'num' to ALLOCATE_BLOCK of scm audit log. (apache#1413)
  HDDS-4196. Add an endpoint in Recon to query Prometheus (apache#1390)
  HDDS-4211. [OFS] Better owner and group display for listing Ozone volumes and buckets (apache#1397)
  HDDS-4150. recon.api.TestEndpoints test is flaky (apache#1396)
  HDDS-4170 - Fix typo in method description. (apache#1406)
  HDDS-4064. Show container verbose info with verbose option (apache#1290)
  ...
errose28 added a commit to errose28/ozone that referenced this pull request Sep 18, 2020
…ponse

* HDDS-4122-quota-attempt2: (51 commits)
  Remove redundant check status calls in children of AbstractOMOpenKeyDeleteRequest
  Remove unused inports and fix super constructor calls
  Move common volume byte usage update code to AbstractOMKeyDeleteResponse
  Add volume quota update to open key delete response, and group duplicate code
  HDDS-4104. Provide a way to get the default value and key of java-based-configuration easily (apache#1369)
  HDDS-4250. Fix wrong logger name (apache#1429)
  HDDS-4244. Container deleted wrong replica cause mis-replicated. (apache#1423)
  HDDS-4053. Volume space: add quotaUsageInBytes and update it when write and delete key. (apache#1296)
  HDDS-4210. ResolveBucket during checkAcls fails. (apache#1398)
  HDDS-4075. Retry request on different OM on AccessControlException (apache#1303)
  HDDS-4166. Documentation index page redirects to the wrong address (apache#1372)
  HDDS-4039. Reduce the number of fields in hdds.proto to improve performance (apache#1289)
  HDDS-4155. Directory and filename can end up with same name in a path. (apache#1361)
  HDDS-3927. Rename Ozone OM,DN,SCM runtime options to conform to naming conventions (apache#1401)
  HDDS-4119. Improve performance of the BufferPool management of Ozone client (apache#1336)
  HDDS-4217.Remove test TestOzoneContainerRatis (apache#1408)
  HDDS-4218.Remove test TestRatisManager (apache#1409)
  HDDS-4129. change MAX_QUOTA_IN_BYTES to Long.MAX_VALUE. (apache#1337)
  HDDS-4228: add field 'num' to ALLOCATE_BLOCK of scm audit log. (apache#1413)
  HDDS-4196. Add an endpoint in Recon to query Prometheus (apache#1390)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants