Author: aidanskinner
Date: 2008-10-10 11:39:52 -0400 (Fri, 10 Oct 2008)
New Revision: 2619
Modified:
store/branches/java/broker-queue-refactor/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
Log:
Use committed reads to reduce lock contention
Modified:
store/branches/java/broker-queue-refactor/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
===================================================================
---
store/branches/java/broker-queue-refactor/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2008-10-10
15:19:26 UTC (rev 2618)
+++
store/branches/java/broker-queue-refactor/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2008-10-10
15:39:52 UTC (rev 2619)
@@ -141,6 +141,8 @@
private State _state = State.INITIAL;
+ private TransactionConfig _transactionConfig = new TransactionConfig();
+
public BDBMessageStore()
{
this(DATABASE_FORMAT_VERSION);
@@ -356,6 +358,7 @@
_environment.close();
}
_environment = new Environment(environmentPath, envConfig);
+ _transactionConfig.setReadCommitted(true);
return true;
}
@@ -1062,7 +1065,7 @@
{
try
{
- context.setPayload(_environment.beginTransaction(null, null));
+ context.setPayload(_environment.beginTransaction(null, _transactionConfig
));
}
catch (DatabaseException e)
{