ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [23/43] ignite git commit: IGNITE-4712 Memory leaks in PageMemory
Date Fri, 10 Mar 2017 07:23:44 GMT
IGNITE-4712 Memory leaks in PageMemory


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/0ee11654
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/0ee11654
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/0ee11654

Branch: refs/heads/ignite-4712
Commit: 0ee11654cf0580bf3401d69c5c4e3030000dd477
Parents: c762434
Author: Igor Seliverstov <gvvinblade@gmail.com>
Authored: Mon Feb 20 18:25:07 2017 +0300
Committer: Igor Seliverstov <gvvinblade@gmail.com>
Committed: Wed Mar 1 10:44:54 2017 +0300

----------------------------------------------------------------------
 .../database/IgniteDbAbstractTest.java          | 14 +++++++--
 .../IgniteDbMemoryLeakNonTransactionalTest.java | 31 ++++++++++++++++++++
 2 files changed, 43 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/0ee11654/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbAbstractTest.java
index 9297cec..5f4d5e0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbAbstractTest.java
@@ -56,7 +56,7 @@ public abstract class IgniteDbAbstractTest extends GridCommonAbstractTest
{
     protected abstract boolean indexingEnabled();
 
     /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
+    @SuppressWarnings("unchecked") @Override protected IgniteConfiguration getConfiguration(String
gridName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
         MemoryConfiguration dbCfg = new MemoryConfiguration();
@@ -112,11 +112,21 @@ public abstract class IgniteDbAbstractTest extends GridCommonAbstractTest
{
         ccfg4.setRebalanceMode(CacheRebalanceMode.SYNC);
         ccfg4.setAffinity(new RendezvousAffinityFunction(false, 32));
 
+        CacheConfiguration ccfg5 = new CacheConfiguration("atomic");
+
+        if (indexingEnabled())
+            ccfg5.setIndexedTypes(DbKey.class, DbValue.class);
+
+        ccfg5.setAtomicityMode(CacheAtomicityMode.ATOMIC);
+        ccfg5.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
+        ccfg5.setRebalanceMode(CacheRebalanceMode.SYNC);
+        ccfg5.setAffinity(new RendezvousAffinityFunction(false, 32));
+
         final AffinityFunction aff = new RendezvousAffinityFunction(1, null);
 
         ccfg4.setAffinity(aff);
 
-        cfg.setCacheConfiguration(ccfg, ccfg2, ccfg3, ccfg4);
+        cfg.setCacheConfiguration(ccfg, ccfg2, ccfg3, ccfg4, ccfg5);
 
         TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ee11654/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbMemoryLeakNonTransactionalTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbMemoryLeakNonTransactionalTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbMemoryLeakNonTransactionalTest.java
new file mode 100644
index 0000000..2a6293d
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbMemoryLeakNonTransactionalTest.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.database;
+
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.internal.IgniteEx;
+
+/**
+ *
+ */
+public class IgniteDbMemoryLeakNonTransactionalTest extends IgniteDbMemoryLeakTest {
+    /** {@inheritDoc} */
+    @Override protected IgniteCache<Object, Object> cache(IgniteEx ig) {
+        return ig.cache("atomic");
+    }
+}


Mime
View raw message