Closed dkropachev closed 3 weeks ago
What issues does it solve? A one-line description (at least) would be appreciated.
What issues does it solve? A one-line description (at least) would be appreciated.
Added
Before this PR hosts from are not being shuffled
from tokenring? There is a missing information in the commit message and PR description
Before this PR hosts from are not being shuffled
from tokenring? There is a missing information in the commit message and PR description
Thanks, updated, from tablets
Main goal of this PR is to make
tokenAwareHostPolicy.Pick
code less convoluted. But there are little functional changes:Start shuffling hosts obtained from tablets
Before this PR hosts from tablets are not being shuffled
Consider next hosts information source if current got 0 hosts
There are three host information sources: tablets, meta and tokenring, Before this PR if tables returned no hosts for given token, in certain cases code did not consider meta or tokenring. And same for meta, it did not consider tokenring. After this PR, it starts goes through tablets, meta and tokenring, if current host sources yield no hosts it proceed to next one.
Removes unnecessary locks
There was locking done on
cowTabletList
att.tablets
to read tablets, but sincecowTabletList
solves parallel access issue through COW, it is not needed.