You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/05/29 07:56:35 UTC
[08/12] ignite git commit: Merge remote-tracking branch
'origin/ignite-5267' into ignite-gg-12163
Merge remote-tracking branch 'origin/ignite-5267' into ignite-gg-12163
# Conflicts:
# modules/pds/src/main/java/org/apache/ignite/internal/processors/cache/database/GridCacheDatabaseSharedManager.java
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9c3028a6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9c3028a6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9c3028a6
Branch: refs/heads/ignite-5075-pds
Commit: 9c3028a6414bf7c94a9550b40cc40a7da72d34e0
Parents: 13c5a5f a0fc2b0
Author: Dmitriy Govorukhin <dm...@gmail.com>
Authored: Fri May 26 12:37:32 2017 +0300
Committer: Dmitriy Govorukhin <dm...@gmail.com>
Committed: Fri May 26 12:37:32 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 | 292 +++++++++++++++++++
.../processors/cache/GridCacheProcessor.java | 4 +-
.../GridCacheDatabaseSharedManager.java | 8 +-
.../database/file/FilePageStoreManager.java | 12 +-
.../database/wal/FileWriteAheadLogManager.java | 12 +-
...istentStoreCacheRebalancingAbstractTest.java | 4 +-
...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 +-
40 files changed, 592 insertions(+), 386 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/9c3028a6/modules/pds/src/main/java/org/apache/ignite/internal/processors/cache/database/GridCacheDatabaseSharedManager.java
----------------------------------------------------------------------
diff --cc modules/pds/src/main/java/org/apache/ignite/internal/processors/cache/database/GridCacheDatabaseSharedManager.java
index 589ae13,45b5abf..a78ba27
--- a/modules/pds/src/main/java/org/apache/ignite/internal/processors/cache/database/GridCacheDatabaseSharedManager.java
+++ b/modules/pds/src/main/java/org/apache/ignite/internal/processors/cache/database/GridCacheDatabaseSharedManager.java
@@@ -355,36 -355,15 +355,36 @@@ public class GridCacheDatabaseSharedMan
);
// Intentionally use identity comparison to check if configuration default has changed.
- //noinspection NumberEquality
+ // Noinspection NumberEquality.
- if (cpBufSize == PersistenceConfiguration.DFLT_CHECKPOINT_PAGE_BUFFER_SIZE) {
+ if (cpBufSize == PersistentStoreConfiguration.DFLT_CHECKPOINT_PAGE_BUFFER_SIZE) {
MemoryConfiguration memCfg = cctx.kernalContext().config().getMemoryConfiguration();
+ assert memCfg != null;
+
+ long totalSize = memCfg.getSystemCacheMaxSize();
+
+ if (memCfg.getMemoryPolicies() == null)
+ totalSize += MemoryConfiguration.DFLT_MEMORY_POLICY_MAX_SIZE;
+ else {
+ for (MemoryPolicyConfiguration memPlc : memCfg.getMemoryPolicies()) {
+ if (Long.MAX_VALUE - memPlc.getMaxSize() > totalSize)
+ totalSize += memPlc.getMaxSize();
+ else {
+ totalSize = Long.MAX_VALUE;
+
+ break;
+ }
+ }
+
+ assert totalSize > 0;
+ }
+
// Limit the checkpoint page buffer size by 2GB.
- //TODO find max page cache and use it instead of memCfg.getPageCacheSize() (replaced with Long.MAX_VALUE now)
- long adjusted = Math.min(Long.MAX_VALUE / 4, 2 * 1024L * 1024L * 1024L);
+ long dfltSize = 2 * 1024L * 1024L * 1024L;
+
+ long adjusted = Math.min(totalSize / 4, dfltSize);
- if (memCfg != null && cpBufSize < adjusted) {
+ if (cpBufSize < adjusted) {
U.quietAndInfo(log,
"Default checkpoint page buffer size is too small, setting to an adjusted value: "
+ U.readableSize(adjusted, false)
http://git-wip-us.apache.org/repos/asf/ignite/blob/9c3028a6/modules/pds/src/test/java/org/apache/ignite/cache/database/IgnitePersistentStoreCacheRebalancingAbstractTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/9c3028a6/modules/pds/src/test/java/org/apache/ignite/cache/database/db/file/PageStoreEvictionSelfTest.java
----------------------------------------------------------------------