You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/12/02 12:45:31 UTC
[GitHub] [cassandra] marianne-manaog opened a new pull request, #2038: CASSANDRA-18086: Fix wait time returned to be in nanoseconds
marianne-manaog opened a new pull request, #2038:
URL: https://github.com/apache/cassandra/pull/2038
A bug fix for 'wait' time to be in nanoseconds for consistency instead of microseconds.
patch by @marianne-manaog, although fix suggested by @belliottsmith;
The [Cassandra Jira](https://issues.apache.org/jira/browse/CASSANDRA-18086)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
[GitHub] [cassandra] marianne-manaog commented on pull request #2038: CASSANDRA-18086: Fix wait time returned to be in nanoseconds
Posted by GitBox <gi...@apache.org>.
marianne-manaog commented on PR #2038:
URL: https://github.com/apache/cassandra/pull/2038#issuecomment-1340816358
Thanks for your comment, @belliottsmith. I have updated this branch and PR to reflect all related changes required for review.
> Marianne, I think you intended to merge the 18097 PR in here, but it seems to have merged "cleanly" meaning none of the commits were adopted. Not sure what happened there.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
[GitHub] [cassandra] belliottsmith commented on pull request #2038: CASSANDRA-18086: Fix wait time returned to be in nanoseconds
Posted by GitBox <gi...@apache.org>.
belliottsmith commented on PR #2038:
URL: https://github.com/apache/cassandra/pull/2038#issuecomment-1340721435
Marianne, I think you intended to merge the 18097 PR in here, but it seems to have merged "cleanly" meaning none of the commits were adopted. Not sure what happened there.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
[GitHub] [cassandra] aweisberg commented on pull request #2038: CASSANDRA-18086: Fix wait time returned to be in nanoseconds
Posted by GitBox <gi...@apache.org>.
aweisberg commented on PR #2038:
URL: https://github.com/apache/cassandra/pull/2038#issuecomment-1344622625
Committed as [f0ad7eadbeb3208e08a9339881931222fdab253b](https://github.com/apache/cassandra/commit/f0ad7eadbeb3208e08a9339881931222fdab253b)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
[GitHub] [cassandra] belliottsmith commented on pull request #2038: CASSANDRA-18086: Fix wait time returned to be in nanoseconds
Posted by GitBox <gi...@apache.org>.
belliottsmith commented on PR #2038:
URL: https://github.com/apache/cassandra/pull/2038#issuecomment-1340719493
Yes, we could definitely convert to nanos earlier and always use nanos. Perhaps we can do that in a follow-up patch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
[GitHub] [cassandra] aweisberg closed pull request #2038: CASSANDRA-18086: Fix wait time returned to be in nanoseconds
Posted by GitBox <gi...@apache.org>.
aweisberg closed pull request #2038: CASSANDRA-18086: Fix wait time returned to be in nanoseconds
URL: https://github.com/apache/cassandra/pull/2038
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
[GitHub] [cassandra] aweisberg commented on a diff in pull request #2038: CASSANDRA-18086: Fix wait time returned to be in nanoseconds
Posted by GitBox <gi...@apache.org>.
aweisberg commented on code in PR #2038:
URL: https://github.com/apache/cassandra/pull/2038#discussion_r1039952328
##########
src/java/org/apache/cassandra/service/paxos/ContentionStrategy.java:
##########
@@ -409,7 +409,7 @@ private long computeWaitUntilForContention(int attempts, TableMetadata table, De
}
long wait = waitRandomizer.wait(minWaitMicros, maxWaitMicros, attempts);
Review Comment:
```suggestion
long waitMicros = waitRandomizer.wait(minWaitMicros, maxWaitMicros, attempts);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
[GitHub] [cassandra] marianne-manaog commented on pull request #2038: CASSANDRA-18086: Fix wait time returned to be in nanoseconds
Posted by GitBox <gi...@apache.org>.
marianne-manaog commented on PR #2038:
URL: https://github.com/apache/cassandra/pull/2038#issuecomment-1340893842
Thanks for your comment, @aweisberg. @mfleming kindly added the required tests in [this commit](8ec9d77de6492189fdce92d4b09e9104c6626fae).
> Can you add a unit test to `ContentionStrategyTest` that checks that `computeWaitUntilForContention` is producing values in the range we want?
>
> A better fix is probably to only use microseconds in configuration where it makes expressing the configuration easier and convert to nanoseconds immediately upon reading the configuration. @belliottsmith WDYT?
>
> At a higher level a [`Duration`](https://github.com/airlift/units/blob/c25cb5704978c48f8ce966d0c06447e351cab609/src/main/java/io/airlift/units/Duration.java) would be safer. It works as both a return value and a parameter unlike `TimeUnit` which doesn't pair well with a value.
>
> Or we can keep going with somewhat ambiguous types and just be careful about naming and converting things to nanoseconds as soon as possible.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org