Permalink
Browse files

small commentation before merging with master

  • Loading branch information...
1 parent 393a527 commit e1d301257ce311495a05240270643a42bd1ddc78 Maysam Yabandeh committed May 17, 2012
@@ -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
@@ -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;
}

0 comments on commit e1d3012

Please sign in to comment.