Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

readWrite branch merged into the master branch #13

Closed
wants to merge 48 commits into from

Conversation

maysamyabandeh
Copy link

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.

dgomezferro and others added 30 commits December 2, 2011 15:10
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
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();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bad hashcode.

Copy link
Author

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.

Copy link
Contributor

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;
    }

@maysamyabandeh
Copy link
Author

Daniel, your comments are applied.

return startTimestamp;
}
public long getCommitTimestamp() {
assert(commitTimestamp != -1);//this could happen if it is not set by constructor
Copy link
Contributor

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?

@dgomezferro
Copy link
Contributor

Are you going to address the indentation and readability issues in this merge or do you want to do that afterwards?

@maysamyabandeh
Copy link
Author

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove comments

@maysamyabandeh
Copy link
Author

Daniel, your comments are applied.

public class ColumnFamilyAndQuantifier {
protected byte[] family;
protected byte[] qualifier;
protected Integer hash = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make them private

francisco-perez-sorrosal pushed a commit that referenced this pull request May 27, 2015
Set all configuration through program parameters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants