Skip to content

Shard aware support - #4

Closed
fruch wants to merge 49 commits into
scylladb:masterfrom
fruch:scylla-3.21.0-shard-aware
Closed

Shard aware support#4
fruch wants to merge 49 commits into
scylladb:masterfrom
fruch:scylla-3.21.0-shard-aware

Conversation

@fruch

@fruchfruch commented Mar 9, 2020

Copy link
Copy Markdown

No description provided.

aboudreaultand others added 30 commits October 10, 2019 14:09
* Add iterate_step test
* ngdg docs integration
PYTHON-1205: Fix Undefined column name native_transport_address" error when connecting to C* 4.0
@fruch
fruchforce-pushed the scylla-3.21.0-shard-aware branch 2 times, most recently from c619e5b to 16a903dCompareMarch 11, 2020 16:27
@fruchfruch closed this Mar 11, 2020
@fruchfruch mentioned this pull request Jun 1, 2020
Comment on lines +625 to +635
def shard_id(self, t):
token = t.value
token += MIN_LONG
token <<= self.sharding_ignore_msb
tokLo = token & 0xffffffff
tokHi = (token >> 32) & 0xffffffff
mul1 = tokLo * self.shards_count
mul2 = tokHi * self.shards_count
_sum = (mul1 >> 32) + mul2
output = _sum >> 32
return output

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Python integers are arbitrary in range, I think that the equivalent of 128-bit C code can be used instead.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ugh, I just notice that this PR is closed and #6 is the follow-up, reposting there.

Sign up for freeto 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.

4 participants

@fruch@dimaqq@aboudreault@TheRealFalcon