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

MNTSUP-165 - speed up content_url query #4

Merged
merged 1 commit into from
Oct 19, 2023
Merged

MNTSUP-165 - speed up content_url query #4

merged 1 commit into from
Oct 19, 2023

Conversation

wimfabri
Copy link
Collaborator

No description provided.

@wimfabri wimfabri requested a review from Brobrechts October 18, 2023 15:32
Copy link

@Brobrechts Brobrechts left a comment

Choose a reason for hiding this comment

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

Minor comments, looks like what was discussed.

Pretty sure a dry run was already tried

@@ -456,7 +457,16 @@ def __init__(self, args):

def isDeletionCandidate(self, swarm_object):
if args.filter_method == 'alfresco_db':
result = self.alfresco_db.query_single_value("select count(*) from alf_content_url where content_url like :object_name", {'object_name': f"%/{swarm_object.name}"}) == 0
content_url_short = swarm_object.name[-12:]
content_url_crc = binascii.crc32(bytes(f"swarm://{self.args.swarm_bucket}/{swarm_object.name}", 'ascii'))

Choose a reason for hiding this comment

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

This looks ok, matches basically with swarm2s3:
new_c_url_crc = binascii.crc32(bytes(new_c_url, 'ascii'))

The bucket part I will assume is correct here for MNT

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

bucket should have been domain here

src/main/docker/docker_root/swarmclean.py Show resolved Hide resolved
src/main/docker/docker_root/swarmclean.py Show resolved Hide resolved
@wimfabri wimfabri merged commit 21cd008 into master Oct 19, 2023
2 checks passed
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.

2 participants