prashant-r / Scalaris

DHT Chord Transaction
Apache License 2.0
0 stars 0 forks source link

at de.zib.scalaris.CommonErlangObjects.processResult_commit(CommonErlangObjects.java:156) #77

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Start Scalaris
2. Run a code from java-api:
  TransactionSingleOp sc= new TransactionSingleOp();
  sc.write(self_time_str, now_time);

What is the expected output? What do you see instead?

Error:

SEVERE: null
de.zib.scalaris.AbortException: Erlang message: {fail,abort}
        at de.zib.scalaris.CommonErlangObjects.processResult_commit(CommonErlangObjects.java:156)
        at de.zib.scalaris.TransactionSingleOp.write(TransactionSingleOp.java:369)
        at de.zib.scalaris.TransactionSingleOp.write(TransactionSingleOp.java:399)
        at gvt.TimeUpdate.run(TimeUpdate.java:82)

What version of the product are you using? On what operating system?
Scalaris 0.3.0 on Ubuntu 10.04 LTS, Java 1.6

Original issue reported on code.google.com by subhojit...@gmail.com on 22 Dec 2011 at 9:05

GoogleCodeExporter commented 8 years ago
This can happen if you have two concurrent write operations interfering with 
one another.

A write first reads all replicas of the key-value pair to get the current 
version number and then issues the actual write with an updated version. If in 
between those two steps another transactions also executes these steps, one of 
them will fail.

If all your threads work on the same key, this is not that unlikely. The only 
thing you can do, is re-trying the operation in case of an abort.

Original comment by nico.kru...@googlemail.com on 23 Dec 2011 at 10:19