[ https://issues.apache.org/jira/browse/CASSANDRA-15350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16971341#comment-16971341 ]
Yifan Cai edited comment on CASSANDRA-15350 at 11/11/19 6:56 AM: ----------------------------------------------------------------- The change of calculating the exact size of UTF-8 string has negative performance impact. It needs to iterate through the entire string to determine the actual size in UTF-8. The [benchmark setup|https://issues.apache.org/jira/secure/attachment/12985494/Utf8StringEncodeBench.java] and the result: {code:java} [java] Benchmark Mode Cnt Score Error Units [java] Utf8StringEncodeBench.writeLongText avgt 6 552.458 ± 9.141 ns/op [java] Utf8StringEncodeBench.writeLongTextWithExactSize avgt 6 787.676 ± 120.057 ns/op [java] Utf8StringEncodeBench.writeShortText avgt 6 70.311 ± 8.031 ns/op [java] Utf8StringEncodeBench.writeShortTextWithExactSize avgt 6 71.716 ± 4.790 ns/op {code} I will revert the change. was (Author: yifanc): The change of calculating the exact size of UTF-8 string has negative performance impact. It needs to iterate through the entire string to determine the actual size in UTF-8. The benchmark setup and the result: {code:java} [java] Benchmark Mode Cnt Score Error Units [java] Utf8StringEncodeBench.writeLongText avgt 6 552.458 ± 9.141 ns/op [java] Utf8StringEncodeBench.writeLongTextWithExactSize avgt 6 787.676 ± 120.057 ns/op [java] Utf8StringEncodeBench.writeShortText avgt 6 70.311 ± 8.031 ns/op [java] Utf8StringEncodeBench.writeShortTextWithExactSize avgt 6 71.716 ± 4.790 ns/op {code} I will revert the change. > Add CAS “uncertainty” and “contention" messages that are currently propagated > as a WriteTimeoutException. > --------------------------------------------------------------------------------------------------------- > > Key: CASSANDRA-15350 > URL: https://issues.apache.org/jira/browse/CASSANDRA-15350 > Project: Cassandra > Issue Type: Improvement > Components: Feature/Lightweight Transactions > Reporter: Alex Petrov > Assignee: Yifan Cai > Priority: Normal > Labels: protocolv5, pull-request-available > Attachments: Utf8StringEncodeBench.java > > Time Spent: 20m > Remaining Estimate: 0h > > Right now, CAS uncertainty introduced in > https://issues.apache.org/jira/browse/CASSANDRA-6013 is propagating as > WriteTimeout. One of this conditions it manifests is when there’s at least > one acceptor that has accepted the value, which means that this value _may_ > still get accepted during the later round, despite the proposer failure. > Similar problem happens with CAS contention, which is also indistinguishable > from the “regular” timeout, even though it is visible in metrics correctly. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org