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

Journaling appears not to work when killing one node in a cluster of two #6799

Closed
1 task
cjmunro opened this issue Oct 11, 2016 · 3 comments
Closed
1 task
Labels

Comments

@cjmunro
Copy link

cjmunro commented Oct 11, 2016

OrientDB Version, operating system, or hardware.

2.2.11

Operating System

  • Windows

Expected behavior and actual behavior

When running a cluster of two nodes and killing one of them, then adding a vertex, the addition should be journaled, and synchronized when the other one comes back up.

Steps to reproduce the problem

Download the community edition
Follow the instructions here to set up a cluster with two nodes on the same machine (copy the directory) http://orientdb.com/docs/last/Tutorial-Working-with-distributed-graph-database.html
Start up both using dserver.bat
Connect to localhost/GratefulDeadConcert via the console (connect remote:localhost/GratefulDeadConcert username password)
Kill one node and then try adding a vertex CREATE VERTEX V SET node=2
Error message results
Error: com.orientechnologies.orient.core.exception.ODatabaseException
h rid #13:102
DB name="GratefulDeadConcerts"
DB name="GratefulDeadConcerts"

Error: com.orientechnologies.orient.server.distributed.ODistributedException: Quorum (2) cannot be reached because it is major than available nodes (1)

I can't see the exact config files used in the example in the link above, so I may be missing something

@wolf4ood
Copy link
Member

Hi @cjmunro

that is the expected behaviour. By default the write quorum configuration is majority (n/2 +1 ).
If you set up a cluster with 2 nodes the write quorum would be 2. If one node is down you cannot write.
See here

http://orientdb.com/docs/last/Distributed-Configuration.html

@cjmunro
Copy link
Author

cjmunro commented Oct 11, 2016

OK, thanks, the example I was following must have been 3 nodes at least for this to work

@wolf4ood
Copy link
Member

You can use 2 nodes but you have to manually set the write quorum to 1 in the distributed configuration.

mcculls pushed a commit to mcculls/orientdb that referenced this issue Oct 21, 2016
mcculls pushed a commit to sonatype/orientdb that referenced this issue Nov 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants