-
Notifications
You must be signed in to change notification settings - Fork 871
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
2.1-RC3: Error on executing distributed request for counter: Quorum 2 not reached for request (but it is?) #4316
Comments
Could you please try with last 2.1-SNAPSHOT? |
I tried with the latest snapshot and the problem is still there. HOWEVER, the latest snapshot listed is orientdb-community-2.1-20150610.173559-189-distribution.zip So I'll try again when the next update shows up for today's date or better. |
just tried the latest version from orientdb-community-2.1-20150616.215843-194-distribution.zip Unfortunately, same result, and I still received the same error message. |
I found some more warning messages that could perhaps help better diagnose the problem: 2015-06-16 19:56:35:088 WARNING [db000] detected 1 node(s) in timeout or in conflict and quorum (2) has not been reached, rolling back changes for request (id=10 from=db000 task=command_sql(UPDATE ChatCounters INCREMENT counter=1 RETURN AFTER $current.counter WHERE name='counter1') user=#5:0) [ODistributedResponseManager] 2015-06-16 19:56:35:088 WARNING [db000] Quorum 2 not reached for request (id=10 from=db000 task=command_sql(UPDATE ChatCounters INCREMENT counter=1 RETURN AFTER $current.counter WHERE name='counter1') user=#5:0). Elapsed=16ms Servers in timeout/conflict are: - db000: [{value:52}] Received: {db000=[{value:52}], db001=[{value:52}]} [ODistributedResponseManager] 2015-06-16 19:56:35:088 WARNING [db000] sending undo message for request (id=10 from=db000 task=command_sql(UPDATE ChatCounters INCREMENT counter=1 RETURN AFTER $current.counter WHERE name='counter1') user=#5:0) to server db000 [ODistributedResponseManager] 2015-06-16 19:56:35:088 WARNING [db000] sending undo message for request (id=10 from=db000 task=command_sql(UPDATE ChatCounters INCREMENT counter=1 RETURN AFTER $current.counter WHERE name='counter1') user=#5:0) to server db001 [ODistributedResponseManager] 2015-06-16 19:56:35:088 SEVERE Internal server error: com.orientechnologies.orient.server.distributed.ODistributedException: Error on executing distributed request (id=10 from=db000 task=command_sql(UPDATE ChatCounters INCREMENT counter=1 RETURN AFTER $current.counter WHERE name='counter1') user=#5:0) against database 'chat.[]' to nodes [db001, db000] --> com.orientechnologies.orient.server.distributed.ODistributedException: Quorum 2 not reached for request (id=10 from=db000 task=command_sql(UPDATE ChatCounters INCREMENT counter=1 RETURN AFTER $current.counter WHERE name='counter1') user=#5:0). Elapsed=16ms Servers in timeout/conflict are: - db000: [{value:52}] Received: {db000=[{value:52}], db001=[{value:52}]} [ONetworkProtocolHttpDb] |
After some additional testing, it seems as if the problem is related to this part of the SQL query: RETURN AFTER $current.counter because when I queried just the following (without asking for the new value to be returned), I received NO error and everything appeared to work correctly: UPDATE ChatCounters INCREMENT counter=1 WHERE name='counter1' |
As workaround, could you use this?
And get the counter from the record? |
I tried banging away a bunch of times with the latest 2.2 snapshot, and it didn't give me the error this time for either "RETURN AFTER $current" or "RETURN AFTER $current.counter". One thing though, in case it's a bug, if RETURN is after WHERE as in your statement, I get an error: FAILS:
This seems to work now (as does "RETURN AFTER $current"): |
My mistake the RETURN must go before the WHERE as from docs. |
I was trying to put together a short java demo/test case for a distributed chat application, and I've been coming up with the following error with OrientDB 2.1-RC3. Write Quorum is set to 2. The response received would indicate both databases are in sync, yet the error persists. I also tried changing the Conflict Strategy on the class to version, content, and automerge, all with the same result.
ALSO NOTE, that while an exception is thrown each time, the field IS still properly incremented each time:
com.orientechnologies.orient.server.distributed.ODistributedException: Error on executing distributed request (id=82 from=db000 task=command_sql(UPDATE ChatCounters INCREMENT counter=1 RETURN AFTER $current.counter WHERE name='counter1') user=#5:0) against database 'chat.[]' to nodes [db001, db000]
--> com.orientechnologies.orient.server.distributed.ODistributedException: Quorum 2 not reached for request (id=82 from=db000 task=command_sql(UPDATE ChatCounters INCREMENT counter=1 RETURN AFTER $current.counter WHERE name='counter1') user=#5:0). Elapsed=15ms Servers in timeout/conflict are: - db001: [{value:33}] Received: {db000=[{value:33}], db001=[{value:33}]}
com.orientechnologies.orient.server.distributed.ODistributedException: Error on executing distributed request (id=82 from=db000 task=command_sql(UPDATE ChatCounters INCREMENT counter=1 RETURN AFTER $current.counter WHERE name='counter1') user=#5:0) against database 'chat.[]' to nodes [db001, db000]
--> com.orientechnologies.orient.server.distributed.ODistributedException: Quorum 2 not reached for request (id=82 from=db000 task=command_sql(UPDATE ChatCounters INCREMENT counter=1 RETURN AFTER $current.counter WHERE name='counter1') user=#5:0). Elapsed=15ms Servers in timeout/conflict are: - db001: [{value:34}] Received: {db000=[{value:34}], db001=[{value:34}]}
The text was updated successfully, but these errors were encountered: