ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [11/12] ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-5267' into ignite-5075-pds
Date Mon, 29 May 2017 07:34:01 GMT
Merge remote-tracking branch 'remotes/origin/ignite-5267' into ignite-5075-pds

# Conflicts:
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
#	modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
#	modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
#	modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
#	modules/pds/src/main/java/org/apache/ignite/internal/processors/cache/database/GridCacheOffheapManager.java


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

Branch: refs/heads/ignite-5075-pds
Commit: 31bdd71ebfa13bc109a6989f9a7d84ef290f359a
Parents: 1379eaa c68b61d
Author: sboikov <sboikov@gridgain.com>
Authored: Mon May 29 10:32:42 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon May 29 10:32:42 2017 +0300

----------------------------------------------------------------------
 .../example-persistent-store.xml                |  71 +++++
 examples/pom.xml                                |   7 +
 .../ignite/examples/model/Organization.java     |   9 +
 .../persistentstore/PersistentStoreExample.java |  88 ++++++
 .../PersistentStoreExampleNodeStartup.java      |  29 ++
 .../configuration/IgniteConfiguration.java      |  14 +-
 .../configuration/PersistenceConfiguration.java | 289 ------------------
 .../PersistentStoreConfiguration.java           | 293 +++++++++++++++++++
 .../ignite/internal/MarshallerContextImpl.java  |   6 +-
 .../processors/cache/GridCacheProcessor.java    |  18 +-
 .../GridDhtPartitionsExchangeFuture.java        |  12 +-
 .../processors/query/GridQueryIndexing.java     |   4 +-
 .../processors/query/GridQueryProcessor.java    |  10 +-
 .../processors/query/h2/IgniteH2Indexing.java   |  70 ++---
 modules/pds/pom.xml                             |  49 ++++
 .../GridCacheDatabaseSharedManager.java         |   8 +-
 .../cache/database/GridCacheOffheapManager.java |   5 +-
 .../database/file/FilePageStoreManager.java     |  12 +-
 .../database/wal/FileWriteAheadLogManager.java  | 150 ++++++----
 .../cache/database/wal/RecordSerializer.java    |   2 +-
 .../cache/database/wal/record/HeaderRecord.java |   2 +-
 .../resources/META-INF/classnames.properties    |  28 ++
 ...istentStoreCacheRebalancingAbstractTest.java |   6 +-
 ...tNearCachePutGetWithPersistenceSelfTest.java |   4 +-
 ...ersistentStoreContinuousRestartSelfTest.java |   4 +-
 .../IgnitePersistentStoreDynamicCacheTest.java  |   4 +-
 ...tentStoreMultiNodePutGetRestartSelfTest.java |   4 +-
 .../IgnitePersistentStorePageSizesTest.java     |   4 +-
 ...entStoreRecoveryAfterFileCorruptionTest.java |   6 +-
 ...entStoreRemoveDuringRebalancingSelfTest.java |   4 +-
 ...toreSingleNodePutGetPersistenceSelfTest.java |   4 +-
 ...deWithIndexingPutGetPersistenceSelfTest.java |   4 +-
 .../IgnitePersistentStoreWalTlbSelfTest.java    |   8 +-
 ...ageEvictionDuringPartitionClearSelfTest.java |   4 +-
 .../IgniteDbMultiNodePutGetRestartSelfTest.java |   4 +-
 .../db/IgniteDbPageEvictionSelfTest.java        |   4 +-
 .../db/IgniteDbWholeClusterRestartSelfTest.java |   4 +-
 .../db/RebalancingOnNotStableTopologyTest.java  |   6 +-
 .../cache/database/db/TransactionsHangTest.java |   6 +-
 ...IgniteCachePageStoreIntegrationSelfTest.java |   4 +-
 .../file/IgniteNoActualWalHistorySelfTest.java  |   6 +-
 .../IgniteWalDirectoriesConfigurationTest.java  |   6 +-
 .../IgniteWalHistoryReservationsSelfTest.java   |   4 +-
 .../db/file/IgniteWalRecoverySelfTest.java      |   7 +-
 .../IgniteWalRecoverySeveralRestartsTest.java   |   6 +-
 .../PageStoreCheckpointSimulationSelfTest.java  |   6 +-
 .../db/file/PageStoreEvictionSelfTest.java      |   4 +-
 .../file/WalRecoveryTxLogicalRecordsTest.java   |   6 +-
 .../GridChangeGlobalStateAbstractTest.java      |   8 +-
 .../extended/GridActivateExtensionTest.java     |   8 +-
 50 files changed, 833 insertions(+), 488 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/31bdd71e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/31bdd71e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/31bdd71e/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index d5720c0,5245cf8..9fe84cb
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@@ -1501,7 -1449,10 +1501,9 @@@ public class GridQueryProcessor extend
       * @param desc Type descriptor.
       * @return Future that will be completed when rebuilding of all indexes is finished.
       */
-     private IgniteInternalFuture<Object> rebuildIndexesFromHash(@Nullable final String
cacheName, @Nullable final QueryTypeDescriptorImpl desc) {
 -    private IgniteInternalFuture<Object> rebuildIndexesFromHash(
 -        @Nullable final String cacheName,
++private IgniteInternalFuture<Object> rebuildIndexesFromHash(@Nullable final String
cacheName,
+         @Nullable final QueryTypeDescriptorImpl desc
+     ) {
          if (idx == null)
              return new GridFinishedFuture<>(new IgniteCheckedException("Indexing is
disabled."));
  

http://git-wip-us.apache.org/repos/asf/ignite/blob/31bdd71e/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --cc modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 2556312,9de971a..0078ba9
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@@ -1876,43 -1874,42 +1876,36 @@@ public class IgniteH2Indexing implement
  
          GridCacheContext cctx = ctx.cache().context().cacheContext(cacheId);
  
 -        IgniteCacheOffheapManager offheapMgr = cctx.isNear() ? cctx.near().dht().context().offheap()
: cctx.offheap();
 +        while (cursor.next()) {
 +            CacheDataRow dataRow = (CacheDataRow)cursor.get();
  
 -        for (int p = 0; p < cctx.affinity().partitions(); p++) {
 -            try (GridCloseableIterator<KeyCacheObject> keyIter = offheapMgr.keysIterator(p))
{
 -                while (keyIter.hasNext()) {
 -                    cctx.shared().database().checkpointReadLock();
 +            boolean done = false;
  
-             while (!done) {
-                 GridCacheEntryEx entry = cctx.cache().entryEx(dataRow.key());
- 
-                 try {
-                     synchronized (entry) {
-                         // TODO : How to correctly get current value and link here?
- 
-                         GridH2Row row = tbl.table().rowDescriptor().createRow(entry.key(),
entry.partition(),
-                                 dataRow.value(), entry.version(), entry.expireTime());
- 
-                         row.link(dataRow.link());
+                     try {
+                         KeyCacheObject key = keyIter.next();
  
-                         List<Index> indexes = tbl.table().getAllIndexes();
+                         while (true) {
+                             try {
+                                 GridCacheEntryEx entry = cctx.isNear() ?
+                                     cctx.near().dht().entryEx(key) : cctx.cache().entryEx(key);
  
 -                                entry.ensureIndexed();
 +                        for (int i = 2; i < indexes.size(); i++) {
 +                            Index idx = indexes.get(i);
  
 -                                break;
 -                            }
 -                            catch (GridCacheEntryRemovedException ignore) {
 -                                // Retry.
 -                            }
 -                            catch (GridDhtInvalidPartitionException ignore) {
 -                                break;
 -                            }
 +                            if (idx instanceof H2TreeIndex)
 +                                ((H2TreeIndex)idx).put(row);
                          }
 +
 +                        done = true;
                      }
 -                    finally {
 -                        cctx.shared().database().checkpointReadUnlock();
 -                    }
 +                }
 +                catch (GridCacheEntryRemovedException e) {
 +                    // No-op
                  }
              }
 -        }
  
-         }
- 
-         tbl.table().markRebuildFromHashInProgress(false);
+         for (H2TableDescriptor tblDesc : tables(cacheName))
+             tblDesc.table().markRebuildFromHashInProgress(false);
      }
  
      /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/31bdd71e/modules/pds/src/main/java/org/apache/ignite/internal/processors/cache/database/GridCacheDatabaseSharedManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/31bdd71e/modules/pds/src/main/java/org/apache/ignite/internal/processors/cache/database/GridCacheOffheapManager.java
----------------------------------------------------------------------
diff --cc modules/pds/src/main/java/org/apache/ignite/internal/processors/cache/database/GridCacheOffheapManager.java
index eacf987,9bced42..be3c5e1
--- a/modules/pds/src/main/java/org/apache/ignite/internal/processors/cache/database/GridCacheOffheapManager.java
+++ b/modules/pds/src/main/java/org/apache/ignite/internal/processors/cache/database/GridCacheOffheapManager.java
@@@ -489,14 -472,17 +489,17 @@@ public class GridCacheOffheapManager ex
       *
       */
      private static class RebalanceIteratorAdapter implements IgniteRebalanceIterator {
+         /** Serial version uid. */
+         private static final long serialVersionUID = 0L;
+ 
 -        /** Cache context. */
 -        private GridCacheContext cctx;
 +        /** Cache group caches. */
 +        private final Set<Integer> cacheGrpCaches;
  
          /** WAL iterator. */
 -        private WALIterator walIt;
 +        private final WALIterator walIt;
  
          /** Partition to scan. */
 -        private int part;
 +        private final int part;
  
          /** */
          private Iterator<DataEntry> entryIt;

http://git-wip-us.apache.org/repos/asf/ignite/blob/31bdd71e/modules/pds/src/main/java/org/apache/ignite/internal/processors/cache/database/file/FilePageStoreManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/31bdd71e/modules/pds/src/test/java/org/apache/ignite/cache/database/IgnitePersistentStoreMultiNodePutGetRestartSelfTest.java
----------------------------------------------------------------------


Mime
View raw message