-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[orientdb] put db conn stuff in sync method #609
Conversation
@Override | ||
public void init() throws DBException { | ||
Properties props = getProperties(); | ||
private static final Logger LOG = LoggerFactory.getLogger(OrientDBClient.CLASS); |
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.
Should this be a lower case ".class"?
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.
Nice catch. OrientDBClient.CLASS="usertable".
01ca0d9
to
0e6e044
Compare
Would there be issues here if multiple YCSB clients are run at once? This will only help fix multiple threads in one client correct? Does the initdb need to create the db? Is it possible to make it necessary to have the db already exist as a prerequisite? Like the other bindings ie: Solr and Cassandra |
We could add a note to the README for the folks who use multiple Client invocations, letting them know how to create it in advance? |
Correct.
So, the OrientDB client is the only one that I am aware of that actually creates a database for you. All others require it to be present. I kept this functionality because it was there from the initial creation of the client. I'm ok with removing it, or just writing a note about that specific scenario. |
Either a note or removal sounds fine by me. Could also move the creation into a utility class that the README references. I think I've seen a couple of those. |
0e6e044
to
7d88ecc
Compare
All db connection and creation logic is the same, it is just pulled into a synchronized method so that multiple threads run through the connection process one at a time. Fixes brianfrankcooper#571
7d88ecc
to
6116744
Compare
I decided to keep the db creation functionality in place since 1) it works and 2) mongodb does "create" a database if it doesn't already exist, although in a much more passive way. I added a note about it to the README |
+1 |
[orientdb] put db conn stuff in sync method
[orientdb] put db conn stuff in sync method
[orientdb] put db conn stuff in sync method
All db connection and creation logic is the same, it is just pulled into
a synchronized method so that multiple threads run through the
connection process one at a time.
Fixes #571