Uh oh!
There was an error while loading. Please reload this page.
PHOENIX-6541 Use ROW_TIMESTAMP column value as timestamps for conditional upsert mutations - #1300
Conversation
…onal upsert mutations
tkhurana
commented
Sep 10, 2021
| if (!builder.isEnabled(m) && !builder.isAtomicOp(m)) { | ||
| // or if it is an atomic op and its timestamp is already set | ||
| if (!builder.isEnabled(m) && | ||
| (!builder.isAtomicOp(m) || getMaxTimestamp(m) != HConstants.LATEST_TIMESTAMP)) { |
There was a problem hiding this comment.
Should this be && rather than ||? The comment says "and" not "or"
There was a problem hiding this comment.
Agree with gokcen, something looks missing here.
There was a problem hiding this comment.
@ankitjain64@gokceni It is correct but I will restructure it to make it more readable
gokceni
left a comment
There was a problem hiding this comment.
Either the code comment or the code needs to change
| String original = "ORIGINAL"; | ||
| String updated = "UPDATED"; | ||
| String duplicate = "DUPLICATE"; | ||
| long rowTimestamp = EnvironmentEdgeManager.currentTimeMillis() - 10; |
There was a problem hiding this comment.
Curious is there a particular reason to subtract 10 ms from the rowTimestamp. ?
There was a problem hiding this comment.
@ankitjain64 We just wanted a value that is less than the current time. 10 is chosen arbitrarily.
| } | ||
| ResultSet rs = stmt.executeQuery(); | ||
| assertTrue(rs.next()); | ||
| assertEquals(count, rs.getInt(1)); |
There was a problem hiding this comment.
from the jira description looks like we want to make sure correct timestamps are used for the mutation but we are not validating that in the test case and just the row count. Is that sufficient @tkhurana ?
There was a problem hiding this comment.
@ankitjain64 I was able to repro the problem with just checking row count but I will add the asserts for timestamps also
stoty
commented
Sep 11, 2021
💔 -1 overall
This message was automatically generated. |
stoty
commented
Sep 14, 2021
💔 -1 overall
This message was automatically generated. |
gjacoby126
commented
Sep 14, 2021
@ankitjain64 - do you have any other comments or suggestions for this PR? Otherwise I will merge. |
ankitjain64
commented
Sep 14, 2021
Sure, you can merge this PR. |
…onal upsert mutations (#1300)
No description provided.