billygoatish commented on code in PR #11975:
URL: https://github.com/apache/ozone/pull/11975#discussion_r4590566384
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmLCFilter.java:
##########
@@ -76,6 +78,10 @@ private OmLCFilter(Builder builder) {
* @throws OMException if the filter is invalid.
*/
public void valid(BucketLayout layout) throws OMException {
+ if (tagSet && (tagKey == null || tagValue == null)) {
Review Comment:
@ChenSammi
Passing `null` for both would turn the tag into an empty filter, so the rule
would apply to all objects. That said, I don’t expect this to be a common use
case.
I kept `tagSet` because the ticket explicitly mentions ensuring this :
> OM rejects such a filter too, because
`OzoneBucket#setLifecycleConfiguration` reaches OM without going through S3
Gateway.
My understanding was that we wanted Java client behavior to match S3
Gateway. If we don’t need them to match for this edge case, I’m happy to remove
`tagSet` to keep things simpler.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]