-
Notifications
You must be signed in to change notification settings - Fork 110
readWrite branch merged into the master branch #13
Conversation
Done: maintain elder and failedelder list TODO: reincarnation, GC, elder broadcast, get using failedelder
TODO: GC, HBase client
TODO: GC, wwRows->WAL, send failedElder at connection start, check elders at TSO query
… HBase initial values
…ing everything in some rows
remove sleep in client start
Conflicts: pom.xml src/main/java/com/yahoo/omid/tso/TSOHandler.java src/main/java/com/yahoo/omid/tso/TSOServer.java
still needs more work
fix a performance bug with read-only transactions, compile nativelib based on the jar file set max number of test messages from int to long
measure forced flushes geometric distribution of requests
} | ||
|
||
public int hashCode() { | ||
return (int)getId(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bad hashcode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good enough for the Elder class. Also, here quick computation matters more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not good enough for several reasons:
- You are using it in a hashSet, so it is really important to have use a good hashCode()
- Consecutive elders are going to have very close hashcodes
- Big startTimestamps are going to hash to the same value, which is really really bad
- A good hashCode is very fast:
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + (int) (startTimestamp ^ (startTimestamp >>> 32));
return result;
}
Daniel, your comments are applied. |
return startTimestamp; | ||
} | ||
public long getCommitTimestamp() { | ||
assert(commitTimestamp != -1);//this could happen if it is not set by constructor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a debugging assertion or something you would want to enforce at runtime?
Are you going to address the indentation and readability issues in this merge or do you want to do that afterwards? |
Daniel, your comments are applied |
//if (IsolationLevel.checkForReadWriteConflicts) | ||
//for (RowKey r: msg.readRows) | ||
//if (lockedSet.remove(r.index))//unlock only if it's locked | ||
//sharedState.hashmap.unlock(r.index); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comments
Daniel, your comments are applied. |
public class ColumnFamilyAndQuantifier { | ||
protected byte[] family; | ||
protected byte[] qualifier; | ||
protected Integer hash = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make them private
Set all configuration through program parameters
The readWrite branch includes features like serializability as well as high-granularity locks to scale with number of cores in the status oracle. This merge makes these features available to the main users on the master branch.