Comments (5)
Thanks a lot. I'm a bit busy at the moment, I'll have a look next week.
from zoodb.
Hi, if I understand correctly, this is a fix for the test that you provided.
Or are you seeing a problem with ZooDB? If yes, could you describe the error and tell me which branch you tested? At the moment the test runs just fine for me.
from zoodb.
Hi,
No, it's not a fix for the test.
If you change code to the first version, test won't work, and just hangs up.
The second version (currently in the code) works just fine, that's why test works for you.
Both versions are semantically equal of course.
I'm using master branch, let me know if you need additional info.
from zoodb.
The problem is that ZooDB currently uses one write-lock to lock the whole server. That means that there can be only one open transaction at any time. I had the same problem in some of the Concurrent-Schema tests. As a workaround, I implemented a function DiskAccessOneFile.allowReadConcurrency(true);
(place it before tx.begin()
). This causes the server to use only a read-lock, but it is not threadsafe and should only be used if no more than one thread is controlling the different transactions.
Thanks for reporting this and for the fix to the concurrency test.
from zoodb.
Fixed. In ConcurrencyTest I had to change the startConcurrentTransfer
method to deal with OptimisticVerification Exceptions:
public void run()
{
LOG.debug(">> Starting thread " + transferId + " in pm=" + pm);
synchronized (lock)
{
lock.notifyAll();
}
boolean success = false;
do {
try {
pm.currentTransaction().begin();
Transfer t = (Transfer) pm.getObjectById(transferId, true);
performTransfer(t);
success = true;
} catch (JDOOptimisticVerificationException e) {
success = false;
System.out.println("Transaction failed, retrying...");
} finally {
if (success) {
closePm(pm);
}
}
} while (!success);
LOG.debug(">> Completed thread " + transferId + " in pm=" + pm);
}
from zoodb.
Related Issues (20)
- verboseToLog in DBLogger.java HOT 2
- Improve collection storage
- DB file format changes
- "Page type mismatch" after removing index HOT 7
- Removing index does sometimes not work HOT 1
- (De-)Serializing an PC object should make it DETACHED
- Detached object should not get a new OID when reattached
- java.lang.RuntimeException: Class has not been fully evolved HOT 8
- Concurrent sessions may lead DB using wrong 'head' on start-up
- Implement tool to display database file format version
- Performance decrease wrongly HOT 5
- Improve byte array/buffer handling when reading from storage
- Page type mismatch, expected 4/OID_INDEX (tx=0) but got 0, PageId=718102 HOT 7
- Concurrent use of the same Query instance is not always threadsafe
- IllegalArgumentException: Can not set final [..].HashMap field [..].IdentificationKeys.proteinMap to java.lang.Long HOT 24
- Query on auto-created (and uncommitted) schema causes exception
- Investigate Java 18 (and 9) security implications
- Check whether Java 17 removal of RMI Activation (JEP 407) affects unit tests.
- multithreaded commit() may hang after updating schema HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zoodb.