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

minor issue when when doing a full reindex in queue mode #1658

Open
goromlagche opened this issue Nov 20, 2023 · 0 comments
Open

minor issue when when doing a full reindex in queue mode #1658

goromlagche opened this issue Nov 20, 2023 · 0 comments

Comments

@goromlagche
Copy link

Describe the bug
Not necessarily a bug, but there are some gotchas when trying to do a full reindex with queue mode,

e.g.

Product.reindex(mode: queue)
Searchkick::ProcessQueueJob.perform_later(class_name: "Product")

Does not work as intended.

this does

Product.reindex(mode: queue)
Searchkick::ProcessQueueJob.perform_later(class_name: "Product", index_name: "new_product_index_with_timestamp")

My guess is

index.reindex_queue.push_records(records)
in here index is the raw index. reindex_queue.send(:redis_key) will return new_product_index_with_timestamp

But when process queue job pulls in the data

record_ids = index.reindex_queue.reserve(limit: limit)

it uses alias.

It will be good to update to fix the code path to always use alias name. Or update the readme with a note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant