You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by am...@apache.org on 2019/03/18 16:51:37 UTC
[ignite] branch master updated: IGNITE-11482: MVCC: Error on TxLog
initialization. This closes #6269.
This is an automated email from the ASF dual-hosted git repository.
amashenkov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 7141904 IGNITE-11482: MVCC: Error on TxLog initialization. This closes #6269.
7141904 is described below
commit 7141904c1b941b5b10722ccca65e6c4e24856901
Author: Andrey V. Mashenkov <an...@gmail.com>
AuthorDate: Mon Mar 18 19:51:28 2019 +0300
IGNITE-11482: MVCC: Error on TxLog initialization. This closes #6269.
---
.../processors/cache/mvcc/MvccProcessorImpl.java | 36 ++++++++++++----------
1 file changed, 19 insertions(+), 17 deletions(-)
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java
index 478d156..e2bc516 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java
@@ -298,8 +298,10 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce
if (!ctx.clientNode()) {
assert mvccEnabled && mvccSupported;
- if (txLog == null)
- txLog = new TxLog(ctx, ctx.cache().context().database());
+ synchronized (mux) {
+ if (txLog == null)
+ txLog = new TxLog(ctx, ctx.cache().context().database());
+ }
startVacuumWorkers();
@@ -1088,29 +1090,29 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce
* Launches vacuum workers and scheduler.
*/
void startVacuumWorkers() {
- if (!ctx.clientNode()) {
- synchronized (mux) {
- if (vacuumWorkers == null) {
- assert cleanupQueue == null;
+ assert !ctx.clientNode();
- cleanupQueue = new LinkedBlockingQueue<>();
+ synchronized (mux) {
+ if (vacuumWorkers == null) {
+ assert cleanupQueue == null;
- vacuumWorkers = new ArrayList<>(ctx.config().getMvccVacuumThreadCount() + 1);
+ cleanupQueue = new LinkedBlockingQueue<>();
- vacuumWorkers.add(new VacuumScheduler(ctx, log, this));
+ vacuumWorkers = new ArrayList<>(ctx.config().getMvccVacuumThreadCount() + 1);
- for (int i = 0; i < ctx.config().getMvccVacuumThreadCount(); i++)
- vacuumWorkers.add(new VacuumWorker(ctx, log, cleanupQueue));
+ vacuumWorkers.add(new VacuumScheduler(ctx, log, this));
- for (GridWorker worker : vacuumWorkers)
- new IgniteThread(worker).start();
+ for (int i = 0; i < ctx.config().getMvccVacuumThreadCount(); i++)
+ vacuumWorkers.add(new VacuumWorker(ctx, log, cleanupQueue));
- return;
- }
- }
+ for (GridWorker worker : vacuumWorkers)
+ new IgniteThread(worker).start();
- U.warn(log, "Attempting to start active vacuum.");
+ return;
+ }
}
+
+ U.warn(log, "Attempting to start active vacuum.");
}
/**