Skip to content
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

brick_simple:{add,set,replace} APIs do not return the server-side timstamp for success #2

Closed
norton opened this issue Feb 2, 2011 · 9 comments
Assignees
Milestone

Comments

@norton
Copy link
Contributor

norton commented Feb 2, 2011

These APIs only return 'ok' on success but some applications want/need the server-side created timestamp value to be returned as well. To keep backwards compatibility, a new flag could be added to enable this feature.

@norton
Copy link
Contributor Author

norton commented Jul 25, 2011

Prototype for this change request is on branch norton-server-timestamp.

@tatsuya6502
Copy link
Member

Reviewed the prototype and merged into the dev branch:
hibari/gdss-brick#10 (comment)

@tatsuya6502
Copy link
Member

nodetool-admin is also needed to be updated.

/home/tatsuya/workhub/dev/hibari/hibari% make check-package 
cleaning: hibari-0.3.0-dev-x86_64-unknown-linux-gnu-64 ...

...

./tmp/hibari/bin/hibari start
./tmp/hibari/bin/hibari-admin bootstrap
ok
checking package: hibari-0.3.0-dev-x86_64-unknown-linux-gnu-64 ...
./tmp/hibari/bin/hibari-admin client-add hibari@127.0.0.1
RPC(add_client_monitor) to 'hibari@127.0.0.1' failed due to unknown response: {ok,
                                                                               1362803565835405}
make: *** [check-package] Error 1

@tatsuya6502 tatsuya6502 reopened this Mar 9, 2013
@tatsuya6502
Copy link
Member

Updated nodetool-admin. Commit: hibari/hibari@f2b5341

/home/tatsuya/workhub/dev/hibari/hibari% make check-package 

...

bootstrapping package: hibari-0.3.0-dev-x86_64-unknown-linux-gnu-64 ...
tar -C ./tmp -xzf ../hibari-0.3.0-dev-x86_64-unknown-linux-gnu-64.tgz
./tmp/hibari/bin/hibari start
./tmp/hibari/bin/hibari-admin bootstrap
ok
checking package: hibari-0.3.0-dev-x86_64-unknown-linux-gnu-64 ...
./tmp/hibari/bin/hibari-admin client-add hibari@127.0.0.1
ok
./tmp/hibari/bin/hibari-admin client-list
['hibari@127.0.0.1']
./tmp/hibari/bin/hibari-admin client-delete hibari@127.0.0.1
ok
./tmp/hibari/bin/hibari checkpoint
ok
./tmp/hibari/bin/hibari stop
ok
/home/tatsuya/workhub/dev/hibari/hibari% 

@tatsuya6502
Copy link
Member

I found that multi-node admin server can't be bootstrapped (hibari/gdss-admin#8).

brick_admin and brick_sb modules rely on brick_squorum (simple quorum) client, and the quorum scheme doesn't work with server side timestamp. In squorum, each bricks are configured as standalone role so they will assign different timespamp for a key-value and cause a quorum_error.

To avoid this, brick_squorum:set/6 and brick_squorum:setmulti/2 should explicitly assign timestamp at client (admin server) side.

@tatsuya6502
Copy link
Member

To avoid this, brick_squorum:set/6 and brick_squorum:setmulti/2 should explicitly assign timestamp at client (admin server) side.

Updated but not tested. I'll try to run 3-node admin server config later tonight or early tomorrow.
hibari/gdss-admin@a8fc2ed

@tatsuya6502
Copy link
Member

I found that QuickCheck no longer fails with quorum_error.

@tatsuya6502
Copy link
Member

There is one place that brick_admin directly adds a key-value to the quorum nodes. I updated it to use the same client-side timestamp. (Perhaps this should utilize squorum:set/6, but I fixed in place for now.)

Commits: hibari/gdss-admin@1ec1391, hibari/gdss-admin@f7747e2

@tatsuya6502
Copy link
Member

OK. I verified that it no longer fails to bootstrap 3-node admin server. Closing this issue.

[clus@hibaribench ~]$ grep ADMIN hibari.config 
ADMIN_NODES=(hibari1 hibari2 hibari3)
[clus@hibaribench ~]$ ./clus/priv/clus-hibari.sh bootstrap hibari hibari.config
ok
hibari@hibari1 => hibari@hibari1 hibari@hibari2 hibari@hibari3 hibari@hibari4 hibari@hibari5 hibari@hibari6
[clus@hibaribench ~]$ ./clus/priv/clus-hibari.sh ping hibari hibari.config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants