Closed sylwiaszunejko closed 2 months ago
One small nit, a couple suggestions regarding the commit description:
Use newFramerWithExts instead of newFramer to utilize protocol extensions
The commit title is a bit too long (for example longer than 50/72 rule), but I admit that it's hard to word it better due to long newFramerWithExts
name.
In order to utilize cql protocol extensions, we need to use
newFramerWithExts
instead ofnewFramer
.
Suggestion: When LWT optimization was implemented in gocql (PR number), all newFramer
calls were replaced with newFramerWithExts
calls.
Previously, during the upstream merging the code using
newFramer
was added (https://github.com/scylladb/gocql/pull/)109. That way, theflagLWT
field was set to0
by default, causing the driver to consider every query executed as a LWT query.
Nit: )
should be placed after 109
so that the link is rendered correctly (already fixed it in PR description myself). You could mention specifically that we forgot to replace newFramer
with newFramerWithExts
in that upstream merging.
The issue was not immediately noticed because the only difference in behavior occurs when we want to use
ShuffleReplicas()
inTokenAwareHostPolicy
.This commit fixes that.
Nit: it's not immediately clear that "that" refers to newFramerWithExts
not ShuffleReplicas()
mentioned in the previous sentence.
Maybe it would be good to open an issue for it and set this PR as fixing it. What's the impact on the affected versions? (performance impact?) What are the affected versions? (relevant if there is an actual impact).
@avelanarius I made the changes to the commit and PR description. I am not sure how to change the title to be short but meaningful, do you have any suggestions or should I leave it as it is?
Maybe it would be good to open an issue for it and set this PR as fixing it. What's the impact on the affected versions? (performance impact?) What are the affected versions? (relevant if there is an actual impact).
@roydahan I have created an issue.
@avelanarius Should I make some more changes to this PR or can we merge it as it is?
@sylwiaszunejko - can you quantify the performance impact? Is it something we've measured?
@sylwiaszunejko - can you quantify the performance impact? Is it something we've measured?
@mykaul We do not have any measure for the performance impact. As stated in the PR description, the only difference in behavior occurs when we use ShuffleReplicas()
in TokenAwareHostPolicy
and the query is not LWT. I am not sure how often these kinds of scenarios happen.
When LWT optimization was implemented in gocql (https://github.com/scylladb/gocql/pull/49), all
newFramer
calls were replaced withnewFramerWithExts
calls.Previously, during the upstream merging the code using
newFramer
was added (https://github.com/scylladb/gocql/pull/109) and it was forgotten to replace it withnewFramerWithExts
. That way, theflagLWT
field was set to0
by default, causing the driver to consider every query executed as a LWT query.The issue was not immediately noticed because the only difference in behavior occurs when we want to use
ShuffleReplicas()
inTokenAwareHostPolicy
.This PR fixes the issue by replacing
newFramer
withnewFramerWithExts
.Fixes: #174