Exception
server:
com.mckoi.network.LocalFileSystemRootServer$LFSRootServerProcessor process
严é: Exception during process
com.mckoi.network.CommitFaultException: File 'MyPropertySet' was modified by a concurrent transaction
at com.mckoi.sdb.SimpleDatabase$RootEvents.checkFileChange(SimpleDatabase.java:445)
at com.mckoi.sdb.SimpleDatabase.commit(SimpleDatabase.java:280)
at com.mckoi.network.LocalFileSystemRootServer.performCommit(LocalFileSystemRootServer.java:725)
at com.mckoi.network.LocalFileSystemRootServer.access$1100(LocalFileSystemRootServer.java:178)
at com.mckoi.network.LocalFileSystemRootServer$LFSRootServerProcessor.process(LocalFileSystemRootServer.java:1059)
at com.mckoi.network.TCPInstanceAdminServer$Connection.run(TCPInstanceAdminServer.java:645)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2009-11-6 13:20:25 com.mckoi.network.LocalFileSystemRootServer$LFSRootServerProcessor process
client:
Exception in thread "Thread-6" Exception in thread "Thread-4" Exception in thread "Thread-5" java.lang.NullPointerException
at com.mckoi.network.NetworkTreeSystem.internalPerformTreeWrite(NetworkTreeSystem.java:1042)
at com.mckoi.network.NetworkTreeSystem.performTreeWrite(NetworkTreeSystem.java:1193)
at com.mckoi.data.TreeSystemTransaction.writeNode(TreeSystemTransaction.java:781)
at com.mckoi.data.TreeSystemTransaction.checkOut(TreeSystemTransaction.java:1306)
at com.mckoi.network.NetworkTreeSystem$NetworkTreeSystemTransaction.checkOut(NetworkTreeSystem.java:1457)
at com.mckoi.network.NetworkTreeSystem.flushTransaction(NetworkTreeSystem.java:256)
at com.mckoi.network.MckoiDDBClient.flushTransaction(MckoiDDBClient.java:289)
at com.mckoi.sdb.SDBTransaction.commit(SDBTransaction.java:718)
at user.insertPPFile(user.java:187)
at user$1.run(user.java:34)
at java.lang.Thread.run(Thread.java:619)
java.lang.NullPointerException
at com.mckoi.network.NetworkTreeSystem.internalPerformTreeWrite(NetworkTreeSystem.java:1042)
at com.mckoi.network.NetworkTreeSystem.performTreeWrite(NetworkTreeSystem.java:1193)
at com.mckoi.data.TreeSystemTransaction.writeNode(TreeSystemTransaction.java:781)
at com.mckoi.data.TreeSystemTransaction.checkOut(TreeSystemTransaction.java:1306)
at com.mckoi.network.NetworkTreeSystem$NetworkTreeSystemTransaction.checkOut(NetworkTreeSystem.java:1457)
at com.mckoi.network.NetworkTreeSystem.flushTransaction(NetworkTreeSystem.java:256)
at com.mckoi.network.MckoiDDBClient.flushTransaction(MckoiDDBClient.java:289)
at com.mckoi.sdb.SDBTransaction.commit(SDBTransaction.java:718)
at user.insertPPFile(user.java:187)
at user$1.run(user.java:34)
at java.lang.Thread.run(Thread.java:619)
Exception in thread "Thread-2" java.lang.RuntimeException: File 'MyPropertySet' was modified by a concurrent transaction
at com.mckoi.network.NetworkTreeSystem.getPathNow(NetworkTreeSystem.java:343)
at com.mckoi.network.MckoiDDBClient.getCurrentSnapshot(MckoiDDBClient.java:244)
at com.mckoi.sdb.SDBSession.getCurrentSnapshot(SDBSession.java:162)
at com.mckoi.sdb.SDBSession.createTransaction(SDBSession.java:152)
at user.insertPPFile(user.java:192)
at user$1.run(user.java:34)
at java.lang.Thread.run(Thread.java:619)
java.lang.RuntimeException: File 'MyPropertySet' was modified by a concurrent transaction
at com.mckoi.network.NetworkTreeSystem.internalPerformTreeWrite(NetworkTreeSystem.java:995)
at com.mckoi.network.NetworkTreeSystem.performTreeWrite(NetworkTreeSystem.java:1193)
at com.mckoi.data.TreeSystemTransaction.writeNode(TreeSystemTransaction.java:781)
at com.mckoi.data.TreeSystemTransaction.checkOut(TreeSystemTransaction.java:1306)
at com.mckoi.network.NetworkTreeSystem$NetworkTreeSystemTransaction.checkOut(NetworkTreeSystem.java:1457)
at com.mckoi.network.NetworkTreeSystem.flushTransaction(NetworkTreeSystem.java:256)
at com.mckoi.network.MckoiDDBClient.flushTransaction(MckoiDDBClient.java:289)
at com.mckoi.sdb.SDBTransaction.commit(SDBTransaction.java:718)
at user.insertPPFile(user.java:187)
at user$1.run(user.java:34)
at java.lang.Thread.run(Thread.java:619)
Exception in thread "Thread-3" java.lang.RuntimeException: Read timed out
at com.mckoi.network.NetworkTreeSystem.performCommit(NetworkTreeSystem.java:292)
at com.mckoi.network.MckoiDDBClient.performCommit(MckoiDDBClient.java:309)
at com.mckoi.sdb.SDBTransaction.commit(SDBTransaction.java:721)
at user.insertPPFile(user.java:187)
at user$1.run(user.java:34)
at java.lang.Thread.run(Thread.java:619)
com.mckoi.network.LocalFileSystemRootServer$LFSRootServerProcessor process
严é: Exception during process
com.mckoi.network.CommitFaultException: File 'MyPropertySet' was modified by a concurrent transaction
at com.mckoi.sdb.SimpleDatabase$RootEvents.checkFileChange(SimpleDatabase.java:445)
at com.mckoi.sdb.SimpleDatabase.commit(SimpleDatabase.java:280)
at com.mckoi.network.LocalFileSystemRootServer.performCommit(LocalFileSystemRootServer.java:725)
at com.mckoi.network.LocalFileSystemRootServer.access$1100(LocalFileSystemRootServer.java:178)
at com.mckoi.network.LocalFileSystemRootServer$LFSRootServerProcessor.process(LocalFileSystemRootServer.java:1059)
at com.mckoi.network.TCPInstanceAdminServer$Connection.run(TCPInstanceAdminServer.java:645)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2009-11-6 13:20:25 com.mckoi.network.LocalFileSystemRootServer$LFSRootServerProcessor process
client:
Exception in thread "Thread-6" Exception in thread "Thread-4" Exception in thread "Thread-5" java.lang.NullPointerException
at com.mckoi.network.NetworkTreeSystem.internalPerformTreeWrite(NetworkTreeSystem.java:1042)
at com.mckoi.network.NetworkTreeSystem.performTreeWrite(NetworkTreeSystem.java:1193)
at com.mckoi.data.TreeSystemTransaction.writeNode(TreeSystemTransaction.java:781)
at com.mckoi.data.TreeSystemTransaction.checkOut(TreeSystemTransaction.java:1306)
at com.mckoi.network.NetworkTreeSystem$NetworkTreeSystemTransaction.checkOut(NetworkTreeSystem.java:1457)
at com.mckoi.network.NetworkTreeSystem.flushTransaction(NetworkTreeSystem.java:256)
at com.mckoi.network.MckoiDDBClient.flushTransaction(MckoiDDBClient.java:289)
at com.mckoi.sdb.SDBTransaction.commit(SDBTransaction.java:718)
at user.insertPPFile(user.java:187)
at user$1.run(user.java:34)
at java.lang.Thread.run(Thread.java:619)
java.lang.NullPointerException
at com.mckoi.network.NetworkTreeSystem.internalPerformTreeWrite(NetworkTreeSystem.java:1042)
at com.mckoi.network.NetworkTreeSystem.performTreeWrite(NetworkTreeSystem.java:1193)
at com.mckoi.data.TreeSystemTransaction.writeNode(TreeSystemTransaction.java:781)
at com.mckoi.data.TreeSystemTransaction.checkOut(TreeSystemTransaction.java:1306)
at com.mckoi.network.NetworkTreeSystem$NetworkTreeSystemTransaction.checkOut(NetworkTreeSystem.java:1457)
at com.mckoi.network.NetworkTreeSystem.flushTransaction(NetworkTreeSystem.java:256)
at com.mckoi.network.MckoiDDBClient.flushTransaction(MckoiDDBClient.java:289)
at com.mckoi.sdb.SDBTransaction.commit(SDBTransaction.java:718)
at user.insertPPFile(user.java:187)
at user$1.run(user.java:34)
at java.lang.Thread.run(Thread.java:619)
Exception in thread "Thread-2" java.lang.RuntimeException: File 'MyPropertySet' was modified by a concurrent transaction
at com.mckoi.network.NetworkTreeSystem.getPathNow(NetworkTreeSystem.java:343)
at com.mckoi.network.MckoiDDBClient.getCurrentSnapshot(MckoiDDBClient.java:244)
at com.mckoi.sdb.SDBSession.getCurrentSnapshot(SDBSession.java:162)
at com.mckoi.sdb.SDBSession.createTransaction(SDBSession.java:152)
at user.insertPPFile(user.java:192)
at user$1.run(user.java:34)
at java.lang.Thread.run(Thread.java:619)
java.lang.RuntimeException: File 'MyPropertySet' was modified by a concurrent transaction
at com.mckoi.network.NetworkTreeSystem.internalPerformTreeWrite(NetworkTreeSystem.java:995)
at com.mckoi.network.NetworkTreeSystem.performTreeWrite(NetworkTreeSystem.java:1193)
at com.mckoi.data.TreeSystemTransaction.writeNode(TreeSystemTransaction.java:781)
at com.mckoi.data.TreeSystemTransaction.checkOut(TreeSystemTransaction.java:1306)
at com.mckoi.network.NetworkTreeSystem$NetworkTreeSystemTransaction.checkOut(NetworkTreeSystem.java:1457)
at com.mckoi.network.NetworkTreeSystem.flushTransaction(NetworkTreeSystem.java:256)
at com.mckoi.network.MckoiDDBClient.flushTransaction(MckoiDDBClient.java:289)
at com.mckoi.sdb.SDBTransaction.commit(SDBTransaction.java:718)
at user.insertPPFile(user.java:187)
at user$1.run(user.java:34)
at java.lang.Thread.run(Thread.java:619)
Exception in thread "Thread-3" java.lang.RuntimeException: Read timed out
at com.mckoi.network.NetworkTreeSystem.performCommit(NetworkTreeSystem.java:292)
at com.mckoi.network.MckoiDDBClient.performCommit(MckoiDDBClient.java:309)
at com.mckoi.sdb.SDBTransaction.commit(SDBTransaction.java:721)
at user.insertPPFile(user.java:187)
at user$1.run(user.java:34)
at java.lang.Thread.run(Thread.java:619)
Are you posting a bug report? From the looks of these stack traces, your code is attempting to commit a change to a property set that has been changed by another transaction running concurrently. This is not allowed in the simple database data model, and it will generate a commit fault exception. If you want an object you can update concurrently using the simple database model, you should use a table.
Perhaps you could post an explanation of what you are trying to do and the code that generates the exception.
Perhaps you could post an explanation of what you are trying to do and the code that generates the exception.
What about "Pessimistic Locking, Optimistic Locking, Concurrent Modification" in Mckoi?
thx.
thx.
MckoiDDB uses optimistic concurrency control to manage concurrent modification. For example, if you use a table object in the Simple Database data model, it can guarantee that a client will always be able to insert a row into the table regardless of whatever else is happening to the table concurrently. It will generate a CommitFaultException if multiple concurrent clients attempt to delete the same row from a table.
It looks like you are using a PropertySet wrapped over a file in your code? A property set is an all or nothing type deal in regards to concurrency. A commit fault exception will always be generated if there were concurrent changes made to the set. You will need to retry the property set change in a new transaction if a change fails.
There is no reason why MckoiDDB couldn't support a property set object with more fine grained concurrency control semantics. The reason it's not included is because the Simple Database table object should suit the purposes of users who want this behavior.
There are no locking semantics in the client API because locking is not effective at large scale. Client controlled locking is inappropriate for distributed systems.
It looks like you are using a PropertySet wrapped over a file in your code? A property set is an all or nothing type deal in regards to concurrency. A commit fault exception will always be generated if there were concurrent changes made to the set. You will need to retry the property set change in a new transaction if a change fails.
There is no reason why MckoiDDB couldn't support a property set object with more fine grained concurrency control semantics. The reason it's not included is because the Simple Database table object should suit the purposes of users who want this behavior.
There are no locking semantics in the client API because locking is not effective at large scale. Client controlled locking is inappropriate for distributed systems.

