ARTEMIS-4073 Relaxing some locks that were not necessary and were causing dead locks on the testsuite
This commit is contained in:
parent
d185735e55
commit
0da14a303d
|
@ -185,7 +185,7 @@ public class PageSubscriptionCounterImpl implements PageSubscriptionCounter {
|
|||
}
|
||||
|
||||
@Override
|
||||
public synchronized void increment(Transaction tx, int add, long size) throws Exception {
|
||||
public void increment(Transaction tx, int add, long size) throws Exception {
|
||||
if (tx == null) {
|
||||
if (persistent) {
|
||||
long id = storage.storePageCounterInc(this.subscriptionID, add, size);
|
||||
|
@ -316,7 +316,7 @@ public class PageSubscriptionCounterImpl implements PageSubscriptionCounter {
|
|||
}
|
||||
|
||||
// you need to call this method from the executors when id > 0
|
||||
private synchronized void doIncrement(long id, int variance, long size) {
|
||||
private void doIncrement(long id, int variance, long size) {
|
||||
value.addAndGet(variance);
|
||||
this.persistentSize.addAndGet(size);
|
||||
if (variance > 0) {
|
||||
|
@ -326,12 +326,14 @@ public class PageSubscriptionCounterImpl implements PageSubscriptionCounter {
|
|||
addedPersistentSize.addAndGet(size);
|
||||
}
|
||||
if (id >= 0) {
|
||||
synchronized (this) {
|
||||
incrementRecords.add(id);
|
||||
if (incrementRecords.size() > FLUSH_COUNTER) {
|
||||
this.cleanup();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* used on testing only
|
||||
|
|
Loading…
Reference in New Issue