Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

small commentation before merging with master

  • Loading branch information...
commit e1d301257ce311495a05240270643a42bd1ddc78 1 parent 393a527
Maysam Yabandeh authored
View
2  src/main/java/com/yahoo/omid/client/TSOClient.java
@@ -506,6 +506,8 @@ public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e)
}
}
+ //Added by Maysam Yabandeh
+ //In the new implementation, I need direct access to commit timestamp and the logic for deciding the committed version is more complex. Therefero, this function replaces validRead.
public long commitTimestamp(long transaction, long startTimestamp) throws IOException {
if (aborted.contains(transaction))
return -2;//invalid read
View
7 src/main/java/com/yahoo/omid/tso/RowKey.java
@@ -29,8 +29,7 @@
private byte[] tableId;
private int hash = 0;
//these are not to be serialized, just used for lock-based impl
- public boolean isLocked = false;
- public int index = -1;//the index on hashmap
+ public int index = -1;//the index on hashmap, it is used to sort the rowkeys
public RowKey() {
rowId = new byte[0];
@@ -119,8 +118,8 @@ public int hashCode() {
return hash;
}
- //This is used to access the hashmap
- //no need to serialize
+ //assume: index must be assigned before using the RowKey in a collection
+ //This is used to sort the RowKeys
public int compareTo(RowKey rk) {
return index - rk.index;
}
Please sign in to comment.
Something went wrong with that request. Please try again.