Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2020-06-09 06:48:36 +0000
committerEike Stepper2020-06-09 06:48:36 +0000
commitd62e181f7b4001dfe47e682c49bdfd5e818ee08b (patch)
treee0bd694ebfd96a0bf5d043b6571ff0b311fe0aac
parentc38700c6fa55e1c145fdfa2014bd015211fe203c (diff)
downloadcdo-d62e181f7b4001dfe47e682c49bdfd5e818ee08b.tar.gz
cdo-d62e181f7b4001dfe47e682c49bdfd5e818ee08b.tar.xz
cdo-d62e181f7b4001dfe47e682c49bdfd5e818ee08b.zip
[Releng] Report active schema access when schema can't be locked
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBDatabase.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBDatabase.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBDatabase.java
index ff81211966..e7a41861f7 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBDatabase.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBDatabase.java
@@ -268,12 +268,14 @@ public final class DBDatabase extends SetContainer<IDBConnection> implements IDB
}
long end = System.currentTimeMillis() + TIMEOUT_SCHEMA_ACCESS;
+ SchemaAccess activeSchemaAccess = null;
do
{
synchronized (schemaAccessQueue)
{
- if (schemaAccessQueue.getFirst() == schemaAccess)
+ activeSchemaAccess = schemaAccessQueue.getFirst();
+ if (activeSchemaAccess == schemaAccess)
{
if (write)
{
@@ -295,8 +297,8 @@ public final class DBDatabase extends SetContainer<IDBConnection> implements IDB
}
} while (System.currentTimeMillis() < end);
- throw new TimeoutRuntimeException(
- "Schema " + schema.getName() + " could not be locked for " + (write ? "write" : "read") + " access within " + TIMEOUT_SCHEMA_ACCESS + " milliseconds");
+ throw new TimeoutRuntimeException("Schema " + schema.getName() + " could not be locked for " + (write ? "write" : "read") + " access within "
+ + TIMEOUT_SCHEMA_ACCESS + " milliseconds. Active access: " + activeSchemaAccess);
}
public void endSchemaAccess()

Back to the top