-
Notifications
You must be signed in to change notification settings - Fork 210
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
Do not filter out objects based on last modified timestamp when delete_objects_on_read is enabled #5319
base: main
Are you sure you want to change the base?
Conversation
final S3Object s3Object) { | ||
if (previousScanTime == null) { | ||
if (previousScanTime == null || deleteS3ObjectsOnRead) { |
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.
QUES: could it be ambiguous to put deleteS3ObjectsOnRead under the function context? Is it better to directly put it in the filter?
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.
It seems fine either way as it is directly relevant to this filter, but it could go in the filter directly
@@ -452,4 +455,13 @@ void getNextPartition_with_folder_partitioning_enabled_returns_the_expected_part | |||
assertThat(resultingPartitions.stream().map(PartitionIdentifier::getPartitionKey).collect(Collectors.toList()), | |||
containsInAnyOrder(expectedPartitionIdentifiers.stream().map(PartitionIdentifier::getPartitionKey).map(Matchers::equalTo).collect(Collectors.toList()))); | |||
} | |||
|
|||
@Test | |||
void isLastModifiedTimeAfterMostRecentScanForBucket_returns_true_when_disable_s3_objects_on_read_is_enabled() { |
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.
This is not an ideal test because it doesn't verify the actual public behavior of the class. It's better to verify that the public methods do what you expect when this value is enabled.
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.
I'll create a new test
933c117
to
ef84434
Compare
…e_objects_on_read is enabled Signed-off-by: Taylor Gray <[email protected]>
ef84434
to
2342be0
Compare
Description
When delete_objects_on_read is enabled, we do not need to deduplicate and filter out objects that were already processed, because we know that if the object is not deleted, then it has not been fully processed.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.