-
Notifications
You must be signed in to change notification settings - Fork 583
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
Make some modifications to how the benchmarking tool works in local m… #312
Make some modifications to how the benchmarking tool works in local m… #312
Conversation
ab6af8c
to
bd4cdc9
Compare
@@ -92,6 +94,16 @@ public synchronized void recordReturnCode(int code) { | |||
returnCodes.get(Icode)[0]++; | |||
} | |||
|
|||
public synchronized void recordWarningCode(int code) { | |||
Integer Icode = code; |
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.
Nipick: can we follow Java conventions of beginning variable names with a lower case? We also don't typically prefix variables with type information, though I guess that's not a big deal if you want to leave it as is.
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.
I agree with you formatting suggestion and will update the code as you requested. Originally I had just cloned the recordReturnCode method above and not thought to much about the local variable names.
Awesome! Thanks for digging into this @jwlent55 (: I left a minor nitpick... I think the PR would be good to merge in after fixing the case style. About the questions you brought up:
Thanks again for this change (: -F |
bd4cdc9
to
534881b
Compare
I have amended the code one more time:
I tried to leave the RocksDB options defaults unchanged (except in cases where they are already overridden by the current code) so as not to change current behavior. Still testing, but, we are getting much better performance using:
Note that Samza currently configures UNIVERSAL compaction style by default: |
Oh okay the unconventional case style was a copy paste from elsewhere, I see. Anyway, thanks for fixing both (: I think you should feel free to change the RocksDB default configs we've got in there if your testing shows that you get better performance otherwise. I doubt anyone is using any of that stuff in production yet since it's still pretty experimental. Once we greenlight RocksDB as being stable, then we may want to freeze the default configs provided... -F |
Should I amend this commit with the changes I have so far? |
If it's not too much trouble, sure, go for it (: ! |
b43db74
to
6513d86
Compare
No trouble at all. Had it all loaded up. Just did not want to mess you up by changing the commit as you were merging it. Thanks for the quick replies. |
6513d86
to
1137bfe
Compare
this.lockStripes = props.getInt("rocksdb.lock.stripes", 50); | ||
|
||
// TODO: Validate the default mandatory options | ||
compactionStyle = CompactionStyle.valueOf(props.getString("rocksdb.options.compactionStyle", CompactionStyle.UNIVERSAL.toString())); |
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.
Hmm...
I thought I had given a comment here earlier, but apparently it got lost in the mists of the interwebs. Anyway, it went something along the lines of:
Sorry for another last minute nitpick, but can we make this config extraction part of VoldemortConfig
? It would be ideal if all configs, and their default values, were defined in there only.
Thanks for your work! It's very nice to see someone pushing on the RocksDB front (:
-F
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.
I saw the email notification for your earlier comment, but, also did not see it here. I did find it associated with an obsolete commit:
I think I may have caused the problem by amending my update to fix a spelling mistake just as you were commenting on the code.
In any event, happy to make the change. I debated (with myself) where to place the option definitions: VoldemortConfig or RocksDbStorageConfiguration. I ended up following the Krati pattern. Figured I would guess wrong.
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.
Hmm... it always brings a tear to my eyes to see inconsistencies in the code, but I guess that's a fight we'll take on another day (: ...
Going forward though, it'd be good to try to consolidate configs in VoldemortConfig
as much as possible.
Thanks again for your work!
-F
1137bfe
to
82cad02
Compare
One more version. The Javadoc comments are a bit brief. I did not want to replicate all the information that is documented elsewhere. I did provide a reference the related RocksDB JNI javadocs that will should work inside an IDE. Let me know if that is not acceptable. Since I am now messing with a high churn file there are conflicts. They should be easy to resolve. I just added 3 chunks of code to VoldemortConfig.java. No deletes or changed lines. I need to read up this weekend on how to properly handle them on my end. |
60c9ca3
to
fba157f
Compare
Commit is now rebased off master. |
Hi @jwlent55, I'm sorry but I have some more comments xD ... First, and most importantly, it would be preferable if there was no use of RocksDB-related classes in the Secondly, can you please follow the style/convention of the rest of the class. Use Third, we try to keep the config's default as part of the Javadoc comment of each setter. Again, there is an argument to be made against this way of doing things. I don't like it entirely myself, but I prefer to keep it consistent. So until we change it everywhere, let's keep it the same way... I feel bad for asking you to change the PR a few times in a row :/ . Hopefully you agree with my requested changes... Feel free to say if you don't have time, and I can clean up the changes for you if you prefer, but I would prefer giving you the opportunity to contribute code that won't get changed on the next commit! Thanks! -F |
…ode as part of an evaluation of the RocksDB strorage engine: 1) Ensure that all the warm up records requested are created to eliminate some random errors. 2) Modify the mixed operation in local mode to increment the VectorClock to prevent all iterations from failing due to ObsoleteVersion exceptions. 3) Modify the mixed operation to perform the write even if the read returns nothing rather than silently passing without performing a write (I considered making this an error, but, preferred this approach). 4) Add a new Warning count similar to the ReturnCode count to report how often a mixed operation reads nothing (could be used for other situations). 5) Move the RecordCode report outside the summaryOnly check so that the error counts are always reported. 6) Make it possible to configure the storage engine in local mode. 7) Make several of the RocksDB parameters configurable.
fba157f
to
e1db72a
Compare
Sorry for the delay responding to your comments. I agree that referencing RockDB types from VoldemortConfig is far from ideal. I only used the setter because I thought I might want to add some validation code there instead of in the validate method, but, there is a lot to be said for consistency. The reason for the delay was that I was investigating a whole new approach to configuring RocksDB using an API not available in 3.6.2, Upgrading to RocksDB 3.13.1 turned out to take a lot more work than I expected (3.13.1 has some issues: facebook/rocksdb#606). I think those issues are now under control (perhaps a 3.13.2). The new approach to configuring RocksDB is based on the realization that RocksDB has many, many parameters and they are are well documented in the RocksDB code. Cloning all those parameters and documentation over to Voldemort seemed to be tedious and hard to maintain. I am not yet sure which ones are the most important The new approach allows one to configure RockDB using the native parameter names with very little code in Voldemort and gives one access to almost all of them (many more than are available with the JNI API). Let me know what you think. |
I agree. I think having a pass-through mechanism where So are you thinking of waiting until the next stable release of RocksDB, upgrading the Voldemort dependency, and using this new configuration API? No worries on the delay (: -F |
That is plan and it looks like the latest 3.13.1 build has what we need. Still need to test it a bit more. Especially some OS X testing. A private RocksDB build was our fallback position. We already have one, but, that approach would block a Voldemort pull request. Sent from my iPhone
|
Quick "15 minute test" of OS X yesterday turned into an all day event - RocksDB failed the OS X test. We have a private build of RocksDB 3.13.1 that works for us. Built on one of our Macs after fixing a directory issue related to how the parts are pulled together to build the final jar. Hopefully a real build will be available on Maven Central soon. |
Ok, thanks for the update. It would be ideal if we can keep Voldemort's RocksDB dependency limited to what's available in Maven Central. If a stable RocksDB version is released and you're blocked on the Java artifact publication, just let me know and I might be able to put some pressure on the Samza guys sitting on the other side of the room so they publish the artifact (: -F |
100% agree. The private build was just so we could continue testing internally with what we hoped the official build would look like. I assumed my Voldemort pull requests was blocked on that. In any event a new version of 3.13.1 was just released that looks good. OS X worked for us as did all 4 compression algorithms on Linux-64. Sent from my iPhone
|
I have been building on this commit to add RocksDB support for the truncate operation. That allows the drop store admin function to work. I have something working that passes the unit tests (which I enhanced a bit to verify you can add an item to the store after the truncate) and works in my full deployment environment. This commit already contains two different changes:
Any thoughts if you want to accept some or all of the changes in this commit? I suppose I could separate the truncate changes from the configuration changes, but, if you are close to accepting the configuration changes I would prefer to just build off of them. |
Sorry about that @jwlent55, I hadn't seen that you had did the refactoring to pass through any rocksdb config. The change LGTM. I ran the unit tests locally and then merged it in. -F |
Feel free to send a PR for the other change you're working on as well (: ! |
…ode as part of
an evaluation of the RocksDB strorage engine:
random errors.
all iterations from failing due to ObsoleteVersion exceptions.
rather than silently passing without performing a write (I considered making this
an error, but, preferred this approach).
operation reads nothing (could be used for other situations).
are always reported.