-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-11149. Have a generic version Validator for validating Requests #6932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
bde95f7
f1676be
b77d1bf
561d010
363d9fa
e623fdb
b270bf6
ca3746d
a84749b
fc57929
778229a
9cf34be
66027c2
dc9f93b
c33f78e
a394670
d024eb9
889e081
436dfbd
c1b690d
b9ef7d0
ba133d2
df698f8
0b5ceb5
db76527
49efb20
b819b63
bfa7618
ded3450
568603e
2124f03
4004663
2337f72
56e95eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -460,9 +460,10 @@ public static OMRequest handleCreateBucketWithBucketLayoutDuringPreFinalize( | |||
| * they do not understand. | ||||
| */ | ||||
| @RequestFeatureValidator( | ||||
| conditions = ValidationCondition.OLDER_CLIENT_REQUESTS, | ||||
| conditions = {}, | ||||
| processingPhase = RequestProcessingPhase.PRE_PROCESS, | ||||
| requestType = Type.CreateBucket | ||||
| requestType = Type.CreateBucket, | ||||
| maxClientVersion = ClientVersion.ERASURE_CODING_SUPPORT | ||||
|
||||
| ValidationCondition[] conditions(); |
and tweak changes in @RequestFeatureValidator usage:
- conditions = ValidationCondition.OLDER_CLIENT_REQUESTS,
+ maxClientVersion = ClientVersion.ERASURE_CODING_SUPPORT,to reduce the patch. This changes only 1 line per item, instead of 3 lines + an unchanged line in the middle.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make this so that ClientVersion.BUCKET_LAYOUT_SUPPORT is provided in the annotation for validators that deal with bucket layout. That would make this an exclusive upper bound on the client version that needs to be processed instead of an inclusive one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also we can remove the if statements in the body now right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also check for sanity of maxClientVersion if not equal to MAX_CLIENT_VERSION_FUTURE_VERSION i.e whether it lies in the same range as ClientVersion.values()