Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

graytaylor0
Copy link
Member

@graytaylor0 graytaylor0 commented Jan 9, 2025

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

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

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.

final S3Object s3Object) {
if (previousScanTime == null) {
if (previousScanTime == null || deleteS3ObjectsOnRead) {
Copy link
Collaborator

@chenqi0805 chenqi0805 Jan 9, 2025

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?

Copy link
Member Author

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

chenqi0805
chenqi0805 previously approved these changes Jan 9, 2025
@@ -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() {
Copy link
Member

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.

Copy link
Member Author

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

…e_objects_on_read is enabled

Signed-off-by: Taylor Gray <[email protected]>
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