YCSB icon indicating copy to clipboard operation
YCSB copied to clipboard

YCSB+T: Added transactions to DB and DBWrapper and validate() to Workloa...

Open akon-dey opened this issue 10 years ago • 21 comments

...d.

YCSB+T: Added an example ClosedEconomyWorkload with a simple implementation of validate and a Simple Anomaly Score.

akon-dey avatar Apr 14 '14 04:04 akon-dey

bump on this issue. would like to see this resolved for the Sep release.

busbey avatar Aug 06 '15 01:08 busbey

since this changes the core binding definition it'll probably take some work to get right. /cc @allanbank since the patch as is touches the Mongo code, though I've no reason to believe it will need substantially different handling than other datastores.

open quesiton: if we have commit / abort, what do we do with datastores that have no notion of transactions?

busbey avatar Aug 06 '15 01:08 busbey

The default start(), commit() and abort() are defined as empty methods in DB.java. This is similar to the cleanup() and init() default implementations.

akon-dey avatar Aug 06 '15 05:08 akon-dey

ah. and the default consistency check just says yes blindly. I see. could merge that with the new verify stuff in core workload.

thanks for the pointer!

busbey avatar Aug 06 '15 05:08 busbey

I have merged the changes but the verification code is not fully integrated yet. I'd be happy to help with it.

akon-dey avatar Aug 10 '15 01:08 akon-dey

please don't include additional format fixes, it makes it harder to review the substance of the change.

busbey avatar Aug 10 '15 03:08 busbey

It seems like the update operations reset records to the initial value (totalcash / recordcount), if there has been a readmodifywrite performed on the record then it seems like this breaks the closed economy invariant.

uakfdotb avatar Aug 17 '15 14:08 uakfdotb

Please review the recent changes and let me know if you want me to address anything.

akon-dey avatar Feb 10 '16 05:02 akon-dey

@akon-dey I wrote a very similar start(), commit(), abort() implementation for JdbcDBClient last year, except I added the ability to set the transaction isolation level (see https://github.com/benjaminbrent/YCSB/blob/e2aa4f4be142afc2acfd98e5c3e22bd659da8d01/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBClient.java#L255).

It would be nice to have this in your implementation too. I could submit a pull request if you think this is worthwhile?

0xl3x1 avatar Feb 11 '16 02:02 0xl3x1

This would be useful. We should be able to set the isolation level using the workload configuration properties file. That will make it truly usable.

akon-dey avatar Feb 11 '16 04:02 akon-dey

Please submit a pull request with the ability to set the workload properties.

akon-dey avatar Feb 11 '16 04:02 akon-dey

Hello @akon-dey .

Have you noticed the behavior of ycsb+t when running the load phase (in the ClosedEconomyWorkload layer) using the parameter w = 0 in the mongo db cluster?

It simply gives a NumberFormatException error on the last record (in the ClosedEconomyWorkload layer).

I'm running on Mongodb Atlas and I noticed this error doing tests.

Do you have any idea about this behavior?

morcelicaio avatar Apr 11 '22 23:04 morcelicaio

@morcelicaio I have not experienced it. If you can send me a stack or better, a pull request, I would be happy to incorporate it.

akon-dey avatar Apr 12 '22 23:04 akon-dey

@akon-dey , I did some more tests on another computer and didn't get the same error. Maybe it could have been some point on the other machine. If I get the same error again, I'll let you know. Thanks!

morcelicaio avatar Apr 19 '22 11:04 morcelicaio

Hi @akon-dey and @busbey , I would like to ask another question.

Wasn't YCSB+T merged with the original YCSB?

As I understand it, in the latest available version of YCSB there is no transactional layer you added. I would like to know the status of this.

Thanks!

morcelicaio avatar Apr 19 '22 16:04 morcelicaio

@morcelicaio I don't believe it was merged. There were some changes to the PR that had questions and hence not merged. One was code format related and the other was regarding completeness of the ClosedEconomyWorkload. The first was trivial and the second was not intended to be addressed by the code. It would be best to recreate the PR to address the first issue and merge if it looks good.

akon-dey avatar Apr 19 '22 16:04 akon-dey

it has not yet been merged. There's also merge conflicts, so it will need to go through a rebase before review.

busbey avatar Apr 19 '22 17:04 busbey

Hello guys, @busbey, @akon-dey .

Regarding YCSB+T, he talks about evaluating the transactional part of NoSQL databases.

I'm still testing with MongoDB. I noticed that in the YCSB+T implementation we don't have the code implemented that creates the transaction as it is in the MongoDB documentation Transaction API (https://www.mongodb.com/docs/manual/core/transactions/).

Do I need to implement this code to use YCSB+T? Or do the start() abort() and commit() methods somehow perform these "transactions" implicitly?

Thanks

morcelicaio avatar Nov 08 '22 14:11 morcelicaio

I would assume that if you don't see the mongo transaction API being called then probably the existing code is not making use of it.

busbey avatar Nov 08 '22 20:11 busbey

Just that, @busbey . So how does YCSB+T assess transactional overhead and have a layer to assess transactional consistency when the transaction code implementation is not in the YCSB+T code?

It's a question that maybe other users have as well.

morcelicaio avatar Nov 09 '22 21:11 morcelicaio

as mentioned previously, this proposed change hasn't been merged yet. It also started in 2014, so it's possible it predates the mongo transactional api.

busbey avatar Nov 09 '22 22:11 busbey