[jira] [Updated] (CASSANDRA-13082) Suspect OnDiskIndex.IteratorOrder.startAt code for ASC
[ https://issues.apache.org/jira/browse/CASSANDRA-13082?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] C. Scott Andreas updated CASSANDRA-13082: - Component/s: (was: Core) Local Write-Read Paths > Suspect OnDiskIndex.IteratorOrder.startAt code for ASC > -- > > Key: CASSANDRA-13082 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13082 > Project: Cassandra > Issue Type: Bug > Components: Local Write-Read Paths >Reporter: Dave Brosius >Priority: Trivial > Fix For: 4.x > > > startAt for ASC does > {code} > case ASC: > if (found.cmp < 0) // search term was bigger then whole > data set > return found.index; > return inclusive && (found.cmp == 0 || found.cmp < 0) ? > found.index : found.index - 1; > {code} > which is equivalent to > {code} > case ASC: > if (found.cmp < 0) // search term was bigger then whole > data set > return found.index; > return inclusive ? found.index : found.index - 1; > {code} > which seems wrong. Is the parenthesis wrong here? -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-13082) Suspect OnDiskIndex.IteratorOrder.startAt code for ASC
[ https://issues.apache.org/jira/browse/CASSANDRA-13082?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeff Jirsa updated CASSANDRA-13082: --- Description: startAt for ASC does {code} case ASC: if (found.cmp < 0) // search term was bigger then whole data set return found.index; return inclusive && (found.cmp == 0 || found.cmp < 0) ? found.index : found.index - 1; {code} which is equivalent to {code} case ASC: if (found.cmp < 0) // search term was bigger then whole data set return found.index; return inclusive ? found.index : found.index - 1; {code} which seems wrong. Is the parenthesis wrong here? was: startAt for ASC does case ASC: if (found.cmp < 0) // search term was bigger then whole data set return found.index; return inclusive && (found.cmp == 0 || found.cmp < 0) ? found.index : found.index - 1; which is equivalent to case ASC: if (found.cmp < 0) // search term was bigger then whole data set return found.index; return inclusive ? found.index : found.index - 1; which seems wrong. Is the parenthesis wrong here? > Suspect OnDiskIndex.IteratorOrder.startAt code for ASC > -- > > Key: CASSANDRA-13082 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13082 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Dave Brosius >Priority: Trivial > Fix For: 4.x > > > startAt for ASC does > {code} > case ASC: > if (found.cmp < 0) // search term was bigger then whole > data set > return found.index; > return inclusive && (found.cmp == 0 || found.cmp < 0) ? > found.index : found.index - 1; > {code} > which is equivalent to > {code} > case ASC: > if (found.cmp < 0) // search term was bigger then whole > data set > return found.index; > return inclusive ? found.index : found.index - 1; > {code} > which seems wrong. Is the parenthesis wrong here? -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org