tarantool / vshard

The new generation of sharding based on virtual buckets
Other
100 stars 30 forks source link

Protect sending/receiving bucket from write requests with on_replace trigger #146

Open Gerold103 opened 6 years ago

Gerold103 commented 6 years ago

It is not as expensive as it looks because works during rebalancing only.

Gerold103 commented 6 years ago

In sending buckets we are going to allow writing, so for them the issue is not actual. But for receiving it still is and has a problem: receiving bucket is filling up monotonously by rebalancer, so for the latter a protector should not forbid writing. Maybe, it is possible to allow writing for one fiber only, which calls bucket_recv.

Another common problem - how to lookup buckets if _bucket is memtx, but a transaction can be vinyl?

Also it could be wise to forbid writing into garbage/sent buckets.