-
Notifications
You must be signed in to change notification settings - Fork 468
Closed
Description
@pat I wanted to create this issue to start this discussion to make sure we've exhausted all of the documented solutions.
Right now, we have a model with enough records that a single index is not practical, so instead, we have something like this:
N.times do |i|
ThinkingSphinx::Index.define :document, name: "document_#{i}", :with => :active_record, :delta => ThinkingSphinx::Deltas::SidekiqDelta do
where "MOD(...) = #{i}"
end
end
However, this as the problem that when a record is modified, it ends up creating N delta jobs, one for each index. If N is large enough, this becomes a problem.
It looks like the offending code is here:
index.delta_processor.delete index, instance |
So the question is: Is there a better way to do sharding that avoids this landmine? Or conversely, if this is the best way to shard, then would a PR to help solve this problem be welcome?
Metadata
Metadata
Assignees
Labels
No labels