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

Change to using published solrcloud gem #17

Merged
merged 3 commits into from
Dec 1, 2023
Merged

Change to using published solrcloud gem #17

merged 3 commits into from
Dec 1, 2023

Conversation

billdueber
Copy link
Collaborator

Two minor changes:

  • Change to use solr_cloud-connect gem as published. This code shows where it's awkward and that's a good thing. I can fix that.
  • Add a param to list_old_collections to specify how many you want to keep and wrote a test for it

Two questions:

  • This updates the httpx gem to be on the 1.x verison, not the 0.x that was explicitly specified in this Gemfile.
    Was there a reason for that?
  • The sort-by-date to get the collections to delete isn't stable (things with the same date aren't guaranteed to come
    out in the same order). Makes we wonder if we should use YYYY-mm-dd-hhmmss and find everything before
    now except the last N (i.e., turn now into a YYYY-mm-dd-hhmmss string and use that for the comparison).

@billdueber billdueber requested a review from niquerio December 1, 2023 01:46
# @return [Array] Array of old authority browse Solrcloud collection
# strings
def self.list_old_collections(list = S.solrcloud.collections)
def self.list_old_collections(list = S.solrcloud.collections, keep: 3)
Copy link
Contributor

Choose a reason for hiding this comment

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

Good idea

collections: [collection_name]
}
)
S.solrcloud.create_alias(name: reindex_alias, collection_name: collection_name)
Copy link
Contributor

Choose a reason for hiding this comment

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

This and set_production_alias needs force

@niquerio
Copy link
Contributor

niquerio commented Dec 1, 2023

Re: YYYY-mm-dd-hhmmss this would have the added benefit of being able to do multiple reindexes in a day. Right now I've been manually deleting collections or relying on using a different indexing image. Just adding hhmmss would be way easier.

@billdueber
Copy link
Collaborator Author

I'm actually going to add date/timestamp stuff to the SolrCloud::Connection gem and then we can use that.

@niquerio niquerio merged commit 3f4b113 into main Dec 1, 2023
1 check 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