-
Notifications
You must be signed in to change notification settings - Fork 622
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
Shard awareness extension for Scylla patchset 1 #1210
base: trunk
Are you sure you want to change the base?
Conversation
7a1a249
to
d14fa44
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please rebase on newest master, specifically query_executor.go
needs an update.
connpicker.go
Outdated
} | ||
|
||
func (nopConnPicker) Size() (int, int) { | ||
return 0, 1 // 1 makes hostConnPool want to fill the pool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason to want to fill the pool for no-op?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nopConnPicker is a guard implementation used in newHostConnPool [1]. If it's 0 then hostConnPool.fill is not called. The real ConnPool assignment is deferred to the moment when we have a connection [2]. Maybe we should change the comment, do you have any suggestions?
[1] https://github.com/gocql/gocql/pull/1210/files#diff-3aa88c8ac2c0ffb49cbd55573005b354R283
[2] https://github.com/gocql/gocql/pull/1210/files#diff-3aa88c8ac2c0ffb49cbd55573005b354R515
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm having a couple of ideas here, will try something out first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I'm fine with this guard. Maybe update the comment that if hostConnPool doesn't need to fill the pool, then it won't initiate the picker in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added more detailed description, PTAL.
They are both rebased @alourie afaict. No way to retrigger Travis though, can you do it? |
d14fa44
to
5a13421
Compare
Actually, I was wrong. I have rebased them now. |
5a13421
to
15fb290
Compare
15fb290
to
9b76938
Compare
@mmatczuk yep, I can see that, that's unrelated to your commit. Will review it soon. |
917951f
to
191e22e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @Zariel please have a look
191e22e
to
6fdb280
Compare
@Zariel I rebased that over you latest commit and resolved conflicts in conn.go |
6fdb280
to
db738dc
Compare
I rebased this branch again and dropped ea1cb17 due to that being redone in #1217. We also found and fixed a race in tests (see 8bd5d33) do you want that in a separate PR? @dahankzter updated #1211 with graphs showing why this work so much beneficial to Scylla users. Do you think we could get that merged? |
db738dc
to
fbe2d0d
Compare
The new PR is created #1220. |
Merged. |
Co-authored-by: Henrik Johansson <henrik@scylladb.com> Co-authored-by: Michał Matczuk <michal@scylladb.com>
This allows tokenAwareHostPolicy return token from ExecutableQuery. Co-authored-by: Henrik Johansson <henrik@scylladb.com> Co-authored-by: Michał Matczuk <michal@scylladb.com>
The hostConnPool logic around conns slice is moved to defaultConnPicker. Co-authored-by: Henrik Johansson <henrik@scylladb.com> Co-authored-by: Michał Matczuk <michal@scylladb.com>
fbe2d0d
to
608dba8
Compare
Great. Rebased again, only relevant commits are left. |
Hi, just wanted to ask whether you plan to merge this MR and also the other related; #1211 and if there is some sort of timeline set or some help is needed? This would help me in deciding whether or not use the patched version of gocql. |
Hi @Zariel, |
Friendly ping :) |
@steeve we maintain a shard aware fork at https://github.com/scylladb/gocql |
@mmatczuk yes, we already use it and it great. but it would be nice that the changes be merged, even though the fork is top notch |
@Zariel could you please decide whether the Scylla patch set from |
Please merge :) |
@martin-sucha @Zariel any update on this? I completely agree it's a royal pain for us to ensure all our libraries are pulling in |
I'll take a look at this this coming weekend, I'll be happy to support an interface which allows the Scylla specific logic to live outside the main tree. |
@Zariel any chance you got time to look at this over the weekend? |
So I think this is broadly ok but I think the abstraction could do with some work. It feels like the We could also do with having a type for Also the name |
There is more Scylla specific stuff in the fork at the moment. The shard-awareness seems to be well battle tested. I can send an updated patch set based on what we have now. |
nudge @mmatczuk |
Any chance this could be merged in along with #1211 ? |
6 years and it still here. What's missing to get merged? |
Lot's of things changed on scylla side since this PR was created, we need to review it again. |
This patchset contains the generic part of #1206. It introduces ConnPicker interface that is used to abstract hostConnPool storage.
There are, however, some differences to #1206 code.