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 2019/07/23 04:25:11 UTC
[ignite] branch ignite-11704 updated (e6a793b -> 86bc43e)
This is an automated email from the ASF dual-hosted git repository.
sboikov pushed a change to branch ignite-11704
in repository https://gitbox.apache.org/repos/asf/ignite.git.
from e6a793b ignite-11704
new 2a0a0e0 ignite-11704
new 8c9bd4f Merge remote-tracking branch 'origin/ignite-11704' into ignite-11704
add 78d0462 IGNITE-10663 Read Repair (#5656)
add 4fe0371 IGNITE-11907 Fail Continuous Query registration and do not fail node if remote filter class is missing - Fixes #6645.
add e568524 IGNITE-7384 Ignore IgniteClusterActivateDeactivateTestWithPersistence.testDeactivateDuringEvictionAndRebalance in MVCC mode
add 65e7311 IGNITE-11859 Fixed CommandHandlerParsingTest#testExperimentalCommandIsDisabled() don't works - Fixes #6668.
add 3333b99 IGNITE-11967 Fixed control.sh validate_indexes SQL Index issue must contain information about cache group - Fixes #6673.
add 8a637c6 IGNITE-11958 JDBC connection validation should use it's own task instead of cache validation task - Fixes #6664
add 591dbf6 IGNITE-11907 Fix possible incompatibility with previous versions
add d595bcd IGNITE-11951 Set ThreadLocal node name only once in JdkMarshaller - Fixes #6657.
add f01a47a IGNITE-11946 Remove option "--add-modules=java.transaction" from Ignite launch scripts for Java 9 and 10 - Fixes #6650.
add 225d872 IGNITE-9842 Ignore IgniteErrorOnRebalanceTest.testErrorOnRebalance
add b861813 IGNITE-11685 Java thin client: Handle multiple async requests in parallel - Fixes #6595.
add 43e3fee IGNITE-1472: Enum support for C++
add 6d8b9bb IGNITE-11925: QueryMetrics migration. (#6627)
add 9c32314 IGNITE-11982 Fix bugs of pds
add c952133 IGNITE-11907 Exclude test resource Wrapper.ser from license check
add 1a2c35c IGNITE-11784 Replace TcpDiscoveryNode to nodeId in TcpDiscoveryMessages - Fixes #6685.
add 1d0ced3 IGNITE-11966 Fixed using AdaptiveLoadBalancingSpi without IgniteConfiguration.setIncludeEventTypes(EventType.EVT_TASK_FINISHED, EventType.EVT_TASK_FAILED) leads to memory leak - Fixed #6690.
add f7cfedd IGNITE-12000 Await evictions before stopping nodes in IgniteSqlQueryMinMaxTest to make test stable - Fixes #6708.
add c8c6c0b IGNITE-12001 Remove unreasonable assertions from SchemaExchangeSelfTest - Fixes #6709.
add 5b2948b IGNITE-11998 mute tests
add 54da838 IGNITE-11921: CacheGroupMetrics migration to the GridMetricManager. (#6647)
add 8e5210b IGNITE-11989: remove cache preload predicate (#6699)
add 99fbecd IGNITE-11988 control.sh validate_indexes SQL Index issue add information about group and cache id - Fixes #6698.
new a5ef55f ignite-11704
new 86bc43e ignite-11704
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
bin/control.bat | 1 -
bin/control.sh | 1 -
bin/ignite-tf.sh | 1 -
bin/ignite.bat | 1 -
bin/ignite.sh | 1 -
bin/ignitevisorcmd.bat | 1 -
bin/ignitevisorcmd.sh | 1 -
.../benchmarks/jmh/tree/BPlusTreeBenchmark.java | 4 +-
.../benchmarks/jol/GridMetricsJolBenchmark.java | 12 +-
.../thin/JdbcThinDataPageScanPropertySelfTest.java | 9 +-
.../compatibility/PdsWithTtlCompatibilityTest.java | 197 ----------
.../IgniteCompatibilityBasicTestSuite.java | 3 -
modules/compress/pom.xml | 15 +
.../DiskPageCompressionConfigValidationTest.java | 161 ++++++++
.../DiskPageCompressionIntegrationTest.java | 19 +-
.../testsuites/IgnitePdsCompressionTestSuite.java | 2 +
modules/compress/src/test/resources/encryption.jks | Bin 0 -> 6737 bytes
.../main/java/org/apache/ignite/IgniteCache.java | 35 ++
.../apache/ignite/IgniteJdbcThinDataSource.java | 17 -
.../apache/ignite/cache/query/QueryMetrics.java | 6 +-
.../org/apache/ignite/cache/query/ScanQuery.java | 31 --
.../apache/ignite/cache/query/SqlFieldsQuery.java | 32 --
.../org/apache/ignite/cache/query/SqlQuery.java | 31 --
.../ignite/client/ClientConnectionException.java | 18 +-
.../events/CacheConsistencyViolationEvent.java | 69 ++++
.../java/org/apache/ignite/events/EventType.java | 15 +
.../org/apache/ignite/internal/IgniteFeatures.java | 5 +-
.../org/apache/ignite/internal/IgniteKernal.java | 26 +-
.../org/apache/ignite/internal/IgnitionEx.java | 65 ++--
.../ignite/internal/client/thin/ClientChannel.java | 17 +-
.../client/thin/ClientFieldsQueryPager.java | 7 +-
.../internal/client/thin/ClientQueryPager.java | 7 +-
.../ignite/internal/client/thin/ClientUtils.java | 11 +-
.../internal/client/thin/GenericQueryPager.java | 42 +-
.../thin/PayloadInputChannel.java} | 43 ++-
.../internal/client/thin/PayloadOutputChannel.java | 62 +++
.../internal/client/thin/ProtocolVersion.java | 9 +
.../internal/client/thin/ReliableChannel.java | 121 +++---
.../internal/client/thin/TcpClientCache.java | 98 +++--
.../internal/client/thin/TcpClientChannel.java | 276 ++++++++++---
.../internal/client/thin/TcpIgniteClient.java | 56 ++-
.../ignite/internal/commandline/WalCommands.java | 13 +-
.../internal/commandline/cache/CacheCommands.java | 3 +-
.../ignite/internal/jdbc/JdbcConnection.java | 19 +-
.../jdbc/JdbcConnectionValidationTask.java | 54 +++
.../internal/logger/platform/PlatformLogger.java | 2 +-
.../managers/discovery/ClusterMetricsImpl.java | 30 +-
.../IncompleteDeserializationException.java | 53 +++
.../eventstorage/GridEventStorageManager.java | 14 +-
.../internal/metric/IoStatisticsHolderCache.java | 8 +-
.../internal/metric/IoStatisticsHolderIndex.java | 12 +-
.../pagemem/impl/PageMemoryNoStoreImpl.java | 20 +-
.../pagemem/store/IgnitePageStoreManager.java | 4 +-
.../internal/pagemem/wal/record/WALRecord.java | 166 ++++----
.../processors/cache/CacheGroupContext.java | 27 +-
.../processors/cache/CacheGroupMetricsImpl.java | 428 ++++++++++++++++++++-
.../cache/CacheGroupMetricsMXBeanImpl.java | 266 ++-----------
.../processors/cache/CacheMetricsImpl.java | 138 ++++---
.../processors/cache/CacheOperationContext.java | 55 ++-
.../cache/GatewayProtectedCacheProxy.java | 34 ++
.../processors/cache/GridCacheAdapter.java | 376 +++++++++++++++---
.../processors/cache/GridCachePreloader.java | 12 -
.../cache/GridCachePreloaderAdapter.java | 14 -
.../processors/cache/GridCacheProcessor.java | 108 ++++--
.../processors/cache/GridCacheProxyImpl.java | 54 ++-
.../cache/IgniteCacheOffheapManager.java | 2 -
.../cache/IgniteCacheOffheapManagerImpl.java | 77 ++--
.../processors/cache/IgniteCacheProxyImpl.java | 7 +-
.../internal/processors/cache/WalStateManager.java | 13 +-
.../cache/distributed/dht/GridDhtCacheAdapter.java | 3 +
.../distributed/dht/GridPartitionedGetFuture.java | 41 +-
.../distributed/dht/atomic/GridDhtAtomicCache.java | 74 +++-
.../dht/colocated/GridDhtColocatedCache.java | 38 +-
.../dht/preloader/GridDhtPartitionDemander.java | 69 ++--
.../dht/preloader/GridDhtPartitionSupplier.java | 21 +-
.../dht/preloader/GridDhtPreloader.java | 12 -
.../dht/topology/GridDhtLocalPartition.java | 13 +-
.../distributed/near/GridNearAtomicCache.java | 3 +-
.../near/GridNearTransactionalCache.java | 2 +
.../cache/distributed/near/GridNearTxLocal.java | 121 +++++-
.../GridNearReadRepairAbstractFuture.java | 221 +++++++++++
.../GridNearReadRepairCheckOnlyFuture.java | 176 +++++++++
.../near/consistency/GridNearReadRepairFuture.java | 166 ++++++++
.../IgniteConsistencyViolationException.java} | 21 +-
.../cache/local/atomic/GridLocalAtomicCache.java | 12 +-
.../processors/cache/mvcc/MvccProcessorImpl.java | 2 +-
.../cache/persistence/CacheDataRowAdapter.java | 41 +-
.../cache/persistence/DataRegionMetricsImpl.java | 133 +++----
.../cache/persistence/DataStorageMetricsImpl.java | 50 +--
.../GridCacheDatabaseSharedManager.java | 62 +--
.../IgniteCacheDatabaseSharedManager.java | 65 +++-
.../cache/persistence/file/FilePageStore.java | 16 +-
.../persistence/file/FilePageStoreFactory.java | 6 +-
.../persistence/file/FilePageStoreManager.java | 13 +-
.../cache/persistence/file/FilePageStoreV2.java | 4 +-
.../file/FileVersionCheckingFactory.java | 6 +-
.../cache/persistence/pagemem/PageMemoryImpl.java | 13 +-
.../cache/persistence/tree/BPlusTree.java | 13 +-
.../wal/AbstractWalRecordsIterator.java | 15 +-
.../persistence/wal/FileWriteAheadLogManager.java | 11 +-
.../wal/serializer/RecordV1Serializer.java | 15 +-
.../wal/serializer/RecordV2Serializer.java | 4 +-
.../processors/cache/query/CacheQuery.java | 13 -
.../cache/query/GridCacheQueryAdapter.java | 18 -
.../cache/query/GridCacheQueryManager.java | 10 +-
.../cache/query/GridCacheQueryMetricsAdapter.java | 206 ++++++----
.../cache/transactions/IgniteTxEntry.java | 2 +-
.../IgniteTxImplicitSingleStateImpl.java | 5 +
.../cache/transactions/IgniteTxLocalState.java | 5 +
.../cache/transactions/IgniteTxManager.java | 10 +
.../cache/transactions/IgniteTxStateImpl.java | 5 +
.../processors/cache/tree/CacheDataTree.java | 8 +-
.../cache/version/GridCacheVersionManager.java | 2 +-
.../continuous/GridContinuousProcessor.java | 62 ++-
.../continuous/StartRoutineDiscoveryMessage.java | 41 +-
.../datastructures/GridCacheQueueAdapter.java | 1 +
.../internal/processors/job/GridJobProcessor.java | 36 +-
.../persistence/DistributedMetaStorageImpl.java | 52 ++-
.../processors/metric/GridMetricManager.java | 38 +-
.../internal/processors/metric/MetricRegistry.java | 37 +-
.../{LongMetricImpl.java => AtomicLongMetric.java} | 8 +-
...ngAdderMetricImpl.java => LongAdderMetric.java} | 4 +-
...cImpl.java => LongAdderWithDelegateMetric.java} | 46 +--
.../processors/metric/impl/MetricUtils.java | 30 +-
.../processors/odbc/jdbc/JdbcRequestHandler.java | 5 +-
.../processors/query/GridQueryProcessor.java | 3 +-
.../twostep/messages/GridQueryNextPageRequest.java | 2 -
.../query/schema/SchemaIndexCacheVisitorImpl.java | 6 +-
.../internal/util/future/GridCompoundFuture.java | 14 +-
.../util/io/GridByteArrayOutputStream.java | 5 +
.../util/tostring/GridToStringBuilder.java | 47 ++-
.../util/tostring/GridToStringClassDescriptor.java | 12 +-
.../util/tostring/GridToStringFieldDescriptor.java | 98 ++++-
.../ignite/marshaller/jdk/JdkMarshaller.java | 43 +--
.../ignite/mxbean/CacheGroupMetricsMXBean.java | 15 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 200 ++++++++--
.../ignite/spi/discovery/tcp/TcpDiscoverySpi.java | 5 +-
.../messages/TcpDiscoveryCustomEventMessage.java | 14 +-
.../messages/TcpDiscoveryDuplicateIdMessage.java | 26 ++
.../messages/TcpDiscoveryStatusCheckMessage.java | 33 +-
.../org/apache/ignite/client/AsyncChannelTest.java | 198 ++++++++++
...idEventStorageRuntimeConfigurationSelfTest.java | 10 +-
.../commandline/CommandHandlerParsingTest.java | 44 ++-
.../IncompleteDeserializationExceptionTest.java | 132 +++++++
.../internal/metric/AbstractExporterSpiTest.java | 8 +-
.../internal/metric/IoStatisticsCacheSelfTest.java | 8 +-
...IoStatisticsMetricsLocalMXBeanImplSelfTest.java | 12 +-
.../internal/metric/IoStatisticsSelfTest.java | 18 +-
.../ignite/internal/metric/MetricsSelfTest.java | 36 +-
.../pagemem/impl/PageMemoryNoLoadSelfTest.java | 4 +-
.../pagemem/wal/record/WALRecordTest.java} | 47 +--
...csMBeanTest.java => CacheGroupMetricsTest.java} | 125 +++---
.../cache/IgniteClusterActivateDeactivateTest.java | 52 +--
...usterActivateDeactivateTestWithPersistence.java | 4 +
...eanTest.java => MvccCacheGroupMetricsTest.java} | 2 +-
.../consistency/AbstractFullSetReadRepairTest.java | 242 ++++++++++++
.../cache/consistency/AbstractReadRepairTest.java | 336 ++++++++++++++++
.../cache/consistency/AtomicReadRepairTest.java | 191 +++++++++
.../ExplicitTransactionalReadRepairTest.java | 149 +++++++
.../ImplicitTransactionalReadRepairTest.java | 99 +++++
...icatedExplicitTransactionalReadRepairTest.java} | 21 +-
...icatedImplicitTransactionalReadRepairTest.java} | 18 +-
...BackupExplicitTransactionalReadRepairTest.java} | 9 +-
...BackupImplicitTransactionalReadRepairTest.java} | 9 +-
.../GridCacheDhtEvictionNearReadersSelfTest.java | 2 +-
.../GridCacheRebalancingWithAsyncClearingTest.java | 12 +-
...tePdsRestartAfterFailedToWriteMetaPageTest.java | 201 ++++++++++
.../persistence/IgnitePdsTaskCancelingTest.java | 3 +-
...IgnitePdsCacheWalDisabledOnRebalancingTest.java | 32 +-
.../db/IgnitePdsReserveWalSegmentsTest.java | 6 +-
.../db/wal/WalDeletionArchiveAbstractTest.java | 5 +-
.../IgniteAbstractWalIteratorInvalidCrcTest.java | 2 +-
.../pagemem/BPlusTreePageMemoryImplTest.java | 4 +-
.../BPlusTreeReuseListPageMemoryImplTest.java | 4 +-
.../IgnitePageMemReplaceDelayedWriteUnitTest.java | 3 +-
.../pagemem/IndexStoragePageMemoryImplTest.java | 4 +-
.../persistence/pagemem/NoOpPageStoreManager.java | 4 +-
.../pagemem/PageMemoryImplNoLoadTest.java | 4 +-
.../persistence/pagemem/PageMemoryImplTest.java | 5 +-
.../pagemem/PageMemoryNoStoreLeakTest.java | 4 +-
.../cache/query/CacheDataPageScanQueryTest.java | 24 +-
...ueryRemoteFilterMissingInClassPathSelfTest.java | 148 +++++--
.../cluster/BaselineAutoAdjustInMemoryTest.java | 26 ++
.../processors/database/BPlusTreeSelfTest.java | 9 +-
.../processors/database/CacheFreeListSelfTest.java | 18 +-
.../database/DataRegionMetricsSelfTest.java | 27 +-
.../processors/database/IndexStorageSelfTest.java | 4 +-
.../jobmetrics/GridJobMetricsSelfTest.java | 32 +-
.../junits/multijvm/IgniteCacheProcessProxy.java | 5 +
.../ignite/testsuites/IgniteBasicTestSuite.java | 22 +-
.../IgniteCacheDataStructuresSelfTestSuite.java | 19 +-
.../testsuites/IgniteCacheMvccTestSuite7.java | 8 +-
.../ignite/testsuites/IgniteCacheTestSuite7.java | 4 +-
.../ignite/testsuites/IgnitePdsTestSuite4.java | 5 +
.../GridInternalTaskUnusedWalSegmentsTest.java | 17 +-
.../ignite/internal/managers/discovery/Wrapper.ser | Bin 0 -> 260 bytes
.../processors/query/h2/IgniteH2Indexing.java | 20 +-
.../processors/query/h2/QueryParameters.java | 5 +-
.../internal/processors/query/h2/dml/DmlUtils.java | 2 +-
.../view/SqlSystemViewCacheGroupsIOStatistics.java | 10 +-
.../query/h2/twostep/GridMapQueryExecutor.java | 1 -
.../visor/verify/ValidateIndexesClosure.java | 13 +-
.../org/apache/ignite/client/ClientTestSuite.java | 3 +-
.../cache/CacheAbstractQueryMetricsSelfTest.java | 12 +-
...st.java => CacheGroupMetricsWithIndexTest.java} | 62 ++-
.../cache/IgniteErrorOnRebalanceTest.java | 2 +
.../IgniteCacheReplicatedQuerySelfTest.java | 27 +-
.../processors/cache/index/H2RowCacheSelfTest.java | 15 +-
.../cache/index/SchemaExchangeSelfTest.java | 11 +-
.../query/h2/IgniteSqlQueryMinMaxTest.java | 2 +
.../processors/query/h2/QueryDataPageScanTest.java | 31 +-
.../query/h2/database/InlineIndexHelperTest.java | 12 +-
.../IgniteCacheWithIndexingTestSuite.java | 4 +-
.../cpp/binary/include/ignite/binary/binary_enum.h | 204 ++++++++++
.../include/ignite/binary/binary_enum_entry.h | 107 ++++++
.../include/ignite/binary/binary_raw_reader.h | 23 ++
.../include/ignite/binary/binary_raw_writer.h | 21 +
.../binary/include/ignite/binary/binary_reader.h | 23 ++
.../cpp/binary/include/ignite/binary/binary_type.h | 8 +-
.../binary/include/ignite/binary/binary_writer.h | 22 ++
.../include/ignite/impl/binary/binary_common.h | 6 +
.../ignite/impl/binary/binary_reader_impl.h | 84 +++-
.../include/ignite/impl/binary/binary_utils.h | 82 ++--
.../ignite/impl/binary/binary_writer_impl.h | 69 +++-
.../ignite/impl/interop/interop_input_stream.h | 4 +-
.../platforms/cpp/binary/project/vs/binary.vcxproj | 2 +
.../cpp/binary/project/vs/binary.vcxproj.filters | 6 +
.../cpp/binary/src/binary/binary_raw_reader.cpp | 5 +
.../cpp/binary/src/binary/binary_raw_writer.cpp | 5 +
.../cpp/binary/src/binary/binary_reader.cpp | 5 +
.../cpp/binary/src/binary/binary_writer.cpp | 5 +
.../binary/src/impl/binary/binary_reader_impl.cpp | 85 ++--
.../cpp/binary/src/impl/binary/binary_utils.cpp | 43 ++-
.../binary/src/impl/binary/binary_writer_impl.cpp | 21 +
.../core-test/include/ignite/binary_test_defs.h | 58 +++
.../cpp/core-test/src/binary_object_test.cpp | 117 ++++++
modules/platforms/cpp/core-test/src/cache_test.cpp | 50 ++-
.../ExpiryCacheHolderTest.cs | 7 +
.../Cache/CacheTestAsyncWrapper.cs | 12 +
.../dotnet/Apache.Ignite.Core/Cache/ICache.cs | 13 +
.../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs | 34 +-
.../Apache.Ignite.Core/Impl/Cache/CacheOp.cs | 3 +-
.../dotnet/Apache.Ignite.Core/Impl/Ignite.cs | 2 +-
modules/sqlline/bin/sqlline.bat | 1 -
modules/sqlline/bin/sqlline.sh | 1 -
.../web-console/web-agent/bin/ignite-web-agent.bat | 1 -
.../web-console/web-agent/bin/ignite-web-agent.sh | 1 -
parent/pom.xml | 3 +-
248 files changed, 7481 insertions(+), 2487 deletions(-)
delete mode 100644 modules/compatibility/src/test/java/org/apache/ignite/compatibility/PdsWithTtlCompatibilityTest.java
create mode 100644 modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/DiskPageCompressionConfigValidationTest.java
create mode 100644 modules/compress/src/test/resources/encryption.jks
create mode 100644 modules/core/src/main/java/org/apache/ignite/events/CacheConsistencyViolationEvent.java
copy modules/core/src/main/java/org/apache/ignite/internal/{util/tostring/GridToStringFieldDescriptor.java => client/thin/PayloadInputChannel.java} (54%)
create mode 100644 modules/core/src/main/java/org/apache/ignite/internal/client/thin/PayloadOutputChannel.java
create mode 100644 modules/core/src/main/java/org/apache/ignite/internal/jdbc/JdbcConnectionValidationTask.java
create mode 100644 modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/IncompleteDeserializationException.java
create mode 100644 modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/consistency/GridNearReadRepairAbstractFuture.java
create mode 100644 modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/consistency/GridNearReadRepairCheckOnlyFuture.java
create mode 100644 modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/consistency/GridNearReadRepairFuture.java
copy modules/core/src/main/java/org/apache/ignite/internal/processors/cache/{persistence/AllocatedPageTracker.java => distributed/near/consistency/IgniteConsistencyViolationException.java} (63%)
rename modules/core/src/main/java/org/apache/ignite/internal/processors/metric/impl/{LongMetricImpl.java => AtomicLongMetric.java} (87%)
copy modules/core/src/main/java/org/apache/ignite/internal/processors/metric/impl/{LongAdderMetricImpl.java => LongAdderMetric.java} (92%)
rename modules/core/src/main/java/org/apache/ignite/internal/processors/metric/impl/{LongAdderMetricImpl.java => LongAdderWithDelegateMetric.java} (52%)
create mode 100644 modules/core/src/test/java/org/apache/ignite/client/AsyncChannelTest.java
create mode 100644 modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IncompleteDeserializationExceptionTest.java
copy modules/core/src/{main/java/org/apache/ignite/internal/util/tostring/GridToStringFieldDescriptor.java => test/java/org/apache/ignite/internal/pagemem/wal/record/WALRecordTest.java} (50%)
rename modules/core/src/test/java/org/apache/ignite/internal/processors/cache/{CacheGroupMetricsMBeanTest.java => CacheGroupMetricsTest.java} (65%)
copy modules/core/src/test/java/org/apache/ignite/internal/processors/cache/{MvccCacheGroupMetricsMBeanTest.java => MvccCacheGroupMetricsTest.java} (92%)
create mode 100644 modules/core/src/test/java/org/apache/ignite/internal/processors/cache/consistency/AbstractFullSetReadRepairTest.java
create mode 100644 modules/core/src/test/java/org/apache/ignite/internal/processors/cache/consistency/AbstractReadRepairTest.java
create mode 100644 modules/core/src/test/java/org/apache/ignite/internal/processors/cache/consistency/AtomicReadRepairTest.java
create mode 100644 modules/core/src/test/java/org/apache/ignite/internal/processors/cache/consistency/ExplicitTransactionalReadRepairTest.java
create mode 100644 modules/core/src/test/java/org/apache/ignite/internal/processors/cache/consistency/ImplicitTransactionalReadRepairTest.java
rename modules/core/src/{main/java/org/apache/ignite/internal/processors/cache/persistence/AllocatedPageTracker.java => test/java/org/apache/ignite/internal/processors/cache/consistency/ReplicatedExplicitTransactionalReadRepairTest.java} (68%)
rename modules/core/src/{main/java/org/apache/ignite/internal/processors/cache/CacheGroupMetrics.java => test/java/org/apache/ignite/internal/processors/cache/consistency/ReplicatedImplicitTransactionalReadRepairTest.java} (66%)
copy modules/core/src/test/java/org/apache/ignite/internal/processors/cache/{MvccCacheGroupMetricsMBeanTest.java => consistency/SingleBackupExplicitTransactionalReadRepairTest.java} (73%)
rename modules/core/src/test/java/org/apache/ignite/internal/processors/cache/{MvccCacheGroupMetricsMBeanTest.java => consistency/SingleBackupImplicitTransactionalReadRepairTest.java} (73%)
create mode 100644 modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRestartAfterFailedToWriteMetaPageTest.java
create mode 100644 modules/core/src/test/resources/org/apache/ignite/internal/managers/discovery/Wrapper.ser
rename modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/{CacheGroupMetricsMBeanWithIndexTest.java => CacheGroupMetricsWithIndexTest.java} (86%)
create mode 100644 modules/platforms/cpp/binary/include/ignite/binary/binary_enum.h
create mode 100644 modules/platforms/cpp/binary/include/ignite/binary/binary_enum_entry.h
[ignite] 02/04: Merge remote-tracking branch 'origin/ignite-11704'
into ignite-11704
Posted by sb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sboikov pushed a commit to branch ignite-11704
in repository https://gitbox.apache.org/repos/asf/ignite.git
commit 8c9bd4f6f2b5f4ae4d669b0bb5a6fd3c3277f610
Merge: 2a0a0e0 e6a793b
Author: sboikov <sb...@apache.org>
AuthorDate: Sun Jul 21 22:41:19 2019 +0300
Merge remote-tracking branch 'origin/ignite-11704' into ignite-11704
# Conflicts:
# modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtLocalPartition.java
.../processors/cache/IgniteCacheOffheapManager.java | 2 ++
.../processors/cache/IgniteCacheOffheapManagerImpl.java | 13 +++++++++++++
2 files changed, 15 insertions(+)
[ignite] 01/04: ignite-11704
Posted by sb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sboikov pushed a commit to branch ignite-11704
in repository https://gitbox.apache.org/repos/asf/ignite.git
commit 2a0a0e0ea41f3f1aa9daca279546625b168faf81
Author: sboikov <sb...@apache.org>
AuthorDate: Fri Jul 19 21:20:51 2019 +0300
ignite-11704
---
.../processors/cache/CacheGroupContext.java | 3 +-
.../processors/cache/GridCacheMapEntry.java | 88 +++++++++++++++++-
.../cache/IgniteCacheOffheapManager.java | 3 +-
.../cache/IgniteCacheOffheapManagerImpl.java | 70 ++++++++------
.../dht/topology/GridDhtLocalPartition.java | 101 ++++++++++++++++++++-
.../cache/persistence/CacheDataRowAdapter.java | 22 ++++-
.../GridCacheDatabaseSharedManager.java | 2 +
.../cache/persistence/GridCacheOffheapManager.java | 8 +-
.../IgniteCacheDatabaseSharedManager.java | 59 ++++++++++++
.../distributed/CacheRemoveWithTombstonesTest.java | 39 ++++++--
10 files changed, 350 insertions(+), 45 deletions(-)
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java
index 4af5de5..7963893 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java
@@ -47,6 +47,7 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtAffini
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtAffinityAssignmentResponse;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPreloader;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
+import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionTopology;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionTopologyImpl;
import org.apache.ignite.internal.processors.cache.persistence.DataRegion;
@@ -1307,7 +1308,7 @@ public class CacheGroupContext {
}
public boolean createTombstone(@Nullable GridDhtLocalPartition part) {
- return part != null && supportsTombstone();
+ return part != null && supportsTombstone() && part.state() == GridDhtPartitionState.MOVING;
}
/**
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index adc8699..08986a9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -1717,8 +1717,12 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
}
}
- if (cctx.group().createTombstone(localPartition()))
- cctx.offheap().removeWithTombstone(cctx, key, newVer, partition(), localPartition());
+ if (cctx.group().createTombstone(localPartition())) {
+ cctx.offheap().removeWithTombstone(cctx, key, newVer, localPartition());
+
+ if (!cctx.group().createTombstone(localPartition()))
+ removeTombstone0(newVer);
+ }
else
removeValue();
@@ -2818,6 +2822,34 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
}
/**
+ * @param tombstoneVer Tombstone version.
+ * @throws GridCacheEntryRemovedException If entry was removed.
+ * @throws IgniteCheckedException If failed.
+ */
+ public void removeTombstone(GridCacheVersion tombstoneVer) throws GridCacheEntryRemovedException, IgniteCheckedException {
+ lockEntry();
+
+ try {
+ checkObsolete();
+
+ removeTombstone0(tombstoneVer);
+ }
+ finally {
+ unlockEntry();
+ }
+ }
+
+ /**
+ * @param tombstoneVer Tombstone version.
+ * @throws IgniteCheckedException If failed.
+ */
+ private void removeTombstone0(GridCacheVersion tombstoneVer) throws IgniteCheckedException {
+ RemoveClosure closure = new RemoveClosure(this, tombstoneVer);
+
+ cctx.offheap().invoke(cctx, key, localPartition(), closure);
+ }
+
+ /**
* @return {@code True} if this entry should not be evicted from cache.
*/
protected boolean evictionDisabled() {
@@ -5720,6 +5752,58 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
/**
*
*/
+ private static class RemoveClosure implements IgniteCacheOffheapManager.OffheapInvokeClosure {
+ /** */
+ private final GridCacheMapEntry entry;
+
+ /** */
+ private final GridCacheVersion ver;
+
+ /** */
+ private IgniteTree.OperationType op;
+
+ /** */
+ private CacheDataRow oldRow;
+
+ public RemoveClosure(GridCacheMapEntry entry, GridCacheVersion ver) {
+ this.entry = entry;
+ this.ver = ver;
+ }
+
+ /** {@inheritDoc} */
+ @Override public @Nullable CacheDataRow oldRow() {
+ return oldRow;
+ }
+
+ /** {@inheritDoc} */
+ @Override public void call(@Nullable CacheDataRow row) throws IgniteCheckedException {
+ if (row == null || !ver.equals(row.version())) {
+ op = IgniteTree.OperationType.NOOP;
+
+ return;
+ }
+
+ row.key(entry.key);
+
+ oldRow = row;
+
+ op = IgniteTree.OperationType.REMOVE;
+ }
+
+ /** {@inheritDoc} */
+ @Override public CacheDataRow newRow() {
+ return null;
+ }
+
+ /** {@inheritDoc} */
+ @Override public IgniteTree.OperationType operationType() {
+ return op;
+ }
+ }
+
+ /**
+ *
+ */
private static class UpdateClosure implements IgniteCacheOffheapManager.OffheapInvokeClosure {
/** */
private final GridCacheMapEntry entry;
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java
index c11e909..2272439 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java
@@ -406,7 +406,6 @@ public interface IgniteCacheOffheapManager {
GridCacheContext cctx,
KeyCacheObject key,
GridCacheVersion ver,
- int partId,
GridDhtLocalPartition part
) throws IgniteCheckedException;
@@ -917,7 +916,7 @@ public interface IgniteCacheOffheapManager {
* @param partId Partition number.
* @throws IgniteCheckedException If failed.
*/
- public void removeWithTombstone(GridCacheContext cctx, KeyCacheObject key, GridCacheVersion ver, int partId) throws IgniteCheckedException;
+ public void removeWithTombstone(GridCacheContext cctx, KeyCacheObject key, GridCacheVersion ver, GridDhtLocalPartition part) throws IgniteCheckedException;
/**
* @param cctx Cache context.
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
index c45e3b1..7ae45b48 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
@@ -18,7 +18,6 @@
package org.apache.ignite.internal.processors.cache;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@@ -179,9 +178,6 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
/** */
protected GridStripedLock partStoreLock = new GridStripedLock(Runtime.getRuntime().availableProcessors());
- /** */
- private CacheObject NULL_VAL;
-
/** {@inheritDoc} */
@Override public GridAtomicLong globalRemoveId() {
return globalRmvId;
@@ -203,8 +199,6 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
if (grp.isLocal())
locCacheDataStore = createCacheDataStore(0);
-
- NULL_VAL = new CacheObjectImpl(null, ctx.marshaller().marshal(null));
}
finally {
ctx.database().checkpointReadUnlock();
@@ -632,28 +626,17 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
GridCacheContext cctx,
KeyCacheObject key,
GridCacheVersion ver,
- int partId,
GridDhtLocalPartition part) throws IgniteCheckedException {
- dataStore(part).removeWithTombstone(cctx, key, ver, partId);
+ assert part != null;
+
+ dataStore(part).removeWithTombstone(cctx, key, ver, part);
}
@Override public boolean isTombstone(CacheDataRow row) throws IgniteCheckedException {
- if (row == null || !grp.supportsTombstone())
+ if (!grp.supportsTombstone())
return false;
- CacheObject val = row.value();
-
- assert val != null : row;
-
- if (val.cacheObjectType() == CacheObject.TYPE_REGULAR) {
- byte[] null_bytes = NULL_VAL.valueBytes(null);
- byte[] bytes = val.valueBytes(null);
-
- if (Arrays.equals(null_bytes, bytes))
- return true;
- }
-
- return false;
+ return grp.shared().database().isTombstone(row);
}
/** {@inheritDoc} */
@@ -2712,7 +2695,7 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
this.oldRow = oldRow;
- newRow = createRow(cctx, key, NULL_VAL, ver, 0, oldRow);
+ newRow = createRow(cctx, key, cctx.shared().database().tombstoneValue(), ver, 0, oldRow);
}
/** {@inheritDoc} */
@@ -2730,7 +2713,11 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
}
/** {@inheritDoc} */
- @Override public void removeWithTombstone(GridCacheContext cctx, KeyCacheObject key, GridCacheVersion ver, int partId) throws IgniteCheckedException {
+ @Override public void removeWithTombstone(
+ GridCacheContext cctx,
+ KeyCacheObject key,
+ GridCacheVersion ver,
+ GridDhtLocalPartition part) throws IgniteCheckedException {
if (!busyLock.enterBusy())
throw new NodeStoppingException("Operation has been cancelled (node is stopping).");
@@ -2745,6 +2732,8 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
assert c.operationType() == PUT || c.operationType() == IN_PLACE : c.operationType();
+ part.tombstoneCreated();
+
if (!isTombstone(c.oldRow))
cctx.tombstoneCreated();
@@ -2933,7 +2922,34 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
@Override public GridCursor<? extends CacheDataRow> cursor(boolean withTombstones) throws IgniteCheckedException {
GridCursor<? extends CacheDataRow> cur = dataTree.find(null, null);
- return withTombstones ? cur : cursorSkipTombstone(cur);
+ return withTombstones ? cursorSkipEmpty(cur) : cursorSkipTombstone(cur);
+ }
+
+ private GridCursor<? extends CacheDataRow> cursorSkipEmpty(final GridCursor<? extends CacheDataRow> cur) {
+ if (!grp.supportsTombstone())
+ return cur;
+
+ return new GridCursor<CacheDataRow>() {
+ CacheDataRow next;
+
+ @Override public boolean next() throws IgniteCheckedException {
+ while (cur.next()) {
+ CacheDataRow next = cur.get();
+
+ if (next.version() != null) {
+ this.next = next;
+
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ @Override public CacheDataRow get() {
+ return next;
+ }
+ };
}
private GridCursor<? extends CacheDataRow> cursorSkipTombstone(final GridCursor<? extends CacheDataRow> cur) {
@@ -2965,7 +2981,9 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
/** {@inheritDoc} */
@Override public GridCursor<? extends CacheDataRow> cursor(Object x) throws IgniteCheckedException {
- return cursorSkipTombstone(dataTree.find(null, null, x));
+ GridCursor<? extends CacheDataRow> cur = dataTree.find(null, null, x);
+
+ return x == CacheDataRowAdapter.RowData.TOMBSTONES ? cursorSkipEmpty(cur) : cursorSkipTombstone(cur);
}
/** {@inheritDoc} */
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtLocalPartition.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtLocalPartition.java
index e3e6435..b5a63e6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtLocalPartition.java
@@ -44,6 +44,7 @@ import org.apache.ignite.internal.processors.cache.GridCacheAdapter;
import org.apache.ignite.internal.processors.cache.GridCacheConcurrentMapImpl;
import org.apache.ignite.internal.processors.cache.GridCacheContext;
import org.apache.ignite.internal.processors.cache.GridCacheEntryEx;
+import org.apache.ignite.internal.processors.cache.GridCacheEntryRemovedException;
import org.apache.ignite.internal.processors.cache.GridCacheMapEntry;
import org.apache.ignite.internal.processors.cache.GridCacheMapEntryFactory;
import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
@@ -54,12 +55,14 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.Gri
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPreloader;
import org.apache.ignite.internal.processors.cache.extras.GridCacheObsoleteEntryExtras;
import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
+import org.apache.ignite.internal.processors.cache.persistence.CacheDataRowAdapter;
import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
import org.apache.ignite.internal.processors.cache.transactions.TxCounters;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.processors.query.GridQueryRowCacheCleaner;
import org.apache.ignite.internal.util.GridLongList;
import org.apache.ignite.internal.util.future.GridFutureAdapter;
+import org.apache.ignite.internal.util.lang.GridCursor;
import org.apache.ignite.internal.util.lang.GridIterator;
import org.apache.ignite.internal.util.tostring.GridToStringExclude;
import org.apache.ignite.internal.util.typedef.internal.LT;
@@ -173,6 +176,9 @@ public class GridDhtLocalPartition extends GridCacheConcurrentMapImpl implements
/** Set if topology update sequence should be updated on partition destroy. */
private boolean updateSeqOnDestroy;
+ /** */
+ private volatile boolean tombstoneCreated;
+
/**
* @param ctx Context.
* @param grp Cache group.
@@ -619,8 +625,12 @@ public class GridDhtLocalPartition extends GridCacheConcurrentMapImpl implements
assert partState == MOVING || partState == LOST;
- if (casState(state, OWNING))
+ if (casState(state, OWNING)) {
+ if (grp.supportsTombstone())
+ submitClearTombstones();
+
return true;
+ }
}
}
@@ -1117,6 +1127,95 @@ public class GridDhtLocalPartition extends GridCacheConcurrentMapImpl implements
}
/**
+ *
+ */
+ public void tombstoneCreated() {
+ tombstoneCreated = true;
+ }
+
+ /**
+ *
+ */
+ private void submitClearTombstones() {
+ if (tombstoneCreated)
+ grp.shared().kernalContext().closure().runLocalSafe(this::clearTombstones, true);
+ }
+
+ /**
+ *
+ */
+ private void clearTombstones() {
+ final int stopCheckingFreq = 1000;
+
+ CacheMapHolder hld = grp.sharedGroup() ? null : singleCacheEntryMap;
+
+ try {
+ GridCursor<? extends CacheDataRow> cur = store.cursor(CacheDataRowAdapter.RowData.TOMBSTONES);
+
+ int cntr = 0;
+
+ while (cur.next()) {
+ CacheDataRow row = cur.get();
+
+ if (!grp.offheap().isTombstone(row))
+ continue;
+
+ assert row.key() != null;
+ assert row.version() != null;
+
+ if (grp.sharedGroup() && (hld == null || hld.cctx.cacheId() != row.cacheId()))
+ hld = cacheMapHolder(ctx.cacheContext(row.cacheId()));
+
+ assert hld != null;
+
+ ctx.database().checkpointReadLock();
+
+ try {
+ while (true) {
+ GridCacheMapEntry cached = null;
+
+ try {
+ cached = putEntryIfObsoleteOrAbsent(
+ hld,
+ hld.cctx,
+ grp.affinity().lastVersion(),
+ row.key(),
+ true,
+ false);
+
+ cached.removeTombstone(row.version());
+
+ cached.touch();
+
+ break;
+ }
+ catch (GridCacheEntryRemovedException e) {
+ cached = null;
+ }
+ finally {
+ if (cached != null)
+ cached.touch();
+ }
+ }
+ }
+ finally {
+ ctx.database().checkpointReadUnlock();
+ }
+
+ cntr++;
+
+ if (cntr % stopCheckingFreq == 0) {
+ if (ctx.kernalContext().isStopping() || state() != OWNING)
+ break;
+ }
+ }
+ }
+ catch (IgniteCheckedException e) {
+ U.error(log, "Failed clear tombstone entries for partition: " + id, e);
+ }
+ }
+
+ /**
* Removes all entries and rows from this partition.
*
* @return Number of rows cleared from page memory.
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CacheDataRowAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CacheDataRowAdapter.java
index f27a311..df46885 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CacheDataRowAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CacheDataRowAdapter.java
@@ -498,6 +498,14 @@ public class CacheDataRowAdapter implements CacheDataRow {
int len = PageUtils.getInt(addr, off);
off += 4;
+ boolean tombstones = rowData == RowData.TOMBSTONES;
+
+ if (tombstones && !sharedCtx.database().isTombstone(addr + off + len + 1)) {
+ verReady = true;
+
+ return;
+ }
+
if (rowData != RowData.NO_KEY && rowData != RowData.NO_KEY_WITH_HINTS) {
byte type = PageUtils.getByte(addr, off);
off++;
@@ -519,10 +527,13 @@ public class CacheDataRowAdapter implements CacheDataRow {
byte type = PageUtils.getByte(addr, off);
off++;
- byte[] bytes = PageUtils.getBytes(addr, off, len);
- off += len;
+ if (!tombstones) {
+ byte[] bytes = PageUtils.getBytes(addr, off, len);
+
+ val = coctx.kernalContext().cacheObjects().toCacheObject(coctx, type, bytes);
+ }
- val = coctx.kernalContext().cacheObjects().toCacheObject(coctx, type, bytes);
+ off += len;
int verLen;
@@ -941,7 +952,10 @@ public class CacheDataRowAdapter implements CacheDataRow {
FULL_WITH_HINTS,
/** Force instant hints actualization for update operation with history (to avoid races with vacuum). */
- NO_KEY_WITH_HINTS
+ NO_KEY_WITH_HINTS,
+
+ /** Do not read row data for non-tombstone entries. */
+ TOMBSTONES
}
/** {@inheritDoc} */
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
index 96cbe2d..8b7ef11 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
@@ -120,6 +120,8 @@ import org.apache.ignite.internal.pagemem.wal.record.delta.PartitionMetaStateRec
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.CacheGroupContext;
import org.apache.ignite.internal.processors.cache.CacheGroupDescriptor;
+import org.apache.ignite.internal.processors.cache.CacheObject;
+import org.apache.ignite.internal.processors.cache.CacheObjectImpl;
import org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor;
import org.apache.ignite.internal.processors.cache.ExchangeActions;
import org.apache.ignite.internal.processors.cache.GridCacheContext;
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
index d4bcbd8..427c0b9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
@@ -2423,12 +2423,16 @@ public class GridCacheOffheapManager extends IgniteCacheOffheapManagerImpl imple
}
/** {@inheritDoc} */
- @Override public void removeWithTombstone(GridCacheContext cctx, KeyCacheObject key, GridCacheVersion ver, int partId) throws IgniteCheckedException {
+ @Override public void removeWithTombstone(
+ GridCacheContext cctx,
+ KeyCacheObject key,
+ GridCacheVersion ver,
+ GridDhtLocalPartition part) throws IgniteCheckedException {
assert ctx.database().checkpointLockIsHeldByThread();
CacheDataStore delegate = init0(false);
- delegate.removeWithTombstone(cctx, key, ver, partId);
+ delegate.removeWithTombstone(cctx, key, ver, part);
}
/** {@inheritDoc} */
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java
index 69a5d50..d1ece85 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache.persistence;
import java.io.File;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
@@ -45,10 +46,13 @@ import org.apache.ignite.internal.mem.DirectMemoryRegion;
import org.apache.ignite.internal.mem.file.MappedFileMemoryProvider;
import org.apache.ignite.internal.mem.unsafe.UnsafeMemoryProvider;
import org.apache.ignite.internal.pagemem.PageMemory;
+import org.apache.ignite.internal.pagemem.PageUtils;
import org.apache.ignite.internal.pagemem.impl.PageMemoryNoStoreImpl;
import org.apache.ignite.internal.pagemem.wal.WALPointer;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.CacheGroupContext;
+import org.apache.ignite.internal.processors.cache.CacheObject;
+import org.apache.ignite.internal.processors.cache.CacheObjectImpl;
import org.apache.ignite.internal.processors.cache.GridCacheMapEntry;
import org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture;
@@ -130,6 +134,8 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
/** First eviction was warned flag. */
private volatile boolean firstEvictWarn;
+ /** */
+ private CacheObject TOMBSTONE_VAL;
/** {@inheritDoc} */
@Override protected void start0() throws IgniteCheckedException {
@@ -145,8 +151,61 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
pageSize = memCfg.getPageSize();
initDataRegions(memCfg);
+
+ TOMBSTONE_VAL = new CacheObjectImpl(null, cctx.marshaller().marshal(null));
+ }
+
+ public CacheObject tombstoneValue() {
+ return TOMBSTONE_VAL;
+ }
+
+ public boolean isTombstone(CacheDataRow row) throws IgniteCheckedException {
+ if (row == null)
+ return false;
+
+ CacheObject val = row.value();
+
+ assert val != null : row;
+
+ if (val.cacheObjectType() == CacheObject.TYPE_REGULAR) {
+ byte[] nullBytes = TOMBSTONE_VAL.valueBytes(null);
+ byte[] bytes = val.valueBytes(null);
+
+ if (Arrays.equals(nullBytes, bytes))
+ return true;
+ }
+
+ return false;
}
+ public boolean isTombstone(long addr) throws IgniteCheckedException {
+ int off = 0;
+
+ byte type = PageUtils.getByte(addr, off + 4);
+
+ if (type != CacheObject.TYPE_REGULAR)
+ return false;
+
+ byte[] nullBytes = TOMBSTONE_VAL.valueBytes(null);
+
+ int len = PageUtils.getInt(addr, off);
+
+ if (len != nullBytes.length)
+ return false;
+
+ off += 5;
+
+ for (int i = 0; i < len; i++) {
+ byte b = PageUtils.getByte(addr, off++);
+
+ if (nullBytes[i] != b)
+ return false;
+ }
+
+ return true;
+ }
+
+
/**
* @param cfg Ignite configuration.
* @param groupName Name of group.
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRemoveWithTombstonesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRemoveWithTombstonesTest.java
index 331fb64..05962c4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRemoveWithTombstonesTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRemoveWithTombstonesTest.java
@@ -17,9 +17,11 @@
package org.apache.ignite.internal.processors.cache.distributed;
+import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheWriteSynchronizationMode;
+import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.DataRegionConfiguration;
import org.apache.ignite.configuration.DataStorageConfiguration;
@@ -28,8 +30,11 @@ import org.apache.ignite.configuration.WALMode;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.TestRecordingCommunicationSpi;
-import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessageV2;
+import org.apache.ignite.internal.processors.cache.GridCacheGroupIdMessage;
+import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage;
import org.apache.ignite.internal.util.lang.GridAbsPredicate;
+import org.apache.ignite.lang.IgniteBiPredicate;
+import org.apache.ignite.plugin.extensions.communication.Message;
import org.apache.ignite.spi.metric.LongMetric;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
@@ -45,7 +50,7 @@ import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
+import static org.apache.ignite.cache.CacheRebalanceMode.ASYNC;
import static org.apache.ignite.internal.processors.metric.impl.MetricUtils.cacheMetricsRegistryName;
/**
@@ -122,6 +127,8 @@ public class CacheRemoveWithTombstonesTest extends GridCommonAbstractTest {
public void testRemoveAndRebalanceRaceTxWithPersistence() throws Exception {
persistence = true;
+ cleanPersistenceDir();
+
testRemoveAndRebalanceRace(TRANSACTIONAL, true);
}
@@ -169,8 +176,7 @@ public class CacheRemoveWithTombstonesTest extends GridCommonAbstractTest {
cache0.putAll(map);
- TestRecordingCommunicationSpi.spi(ignite0).blockMessages(GridDhtPartitionSupplyMessageV2.class,
- getTestIgniteInstanceName(1));
+ blockRebalance(ignite0);
IgniteInternalFuture<?> fut = GridTestUtils.runAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
@@ -180,6 +186,12 @@ public class CacheRemoveWithTombstonesTest extends GridCommonAbstractTest {
IgniteEx ignite1 = (IgniteEx)fut.get(30_000);
+ if (persistence) {
+ ignite0.cluster().baselineAutoAdjustEnabled(false);
+
+ ignite0.cluster().setBaselineTopology(2);
+ }
+
Set<Integer> removed = new HashSet<>();
// Do removes while rebalance is in progress.
@@ -195,7 +207,7 @@ public class CacheRemoveWithTombstonesTest extends GridCommonAbstractTest {
cacheMetricsRegistryName(DEFAULT_CACHE_NAME, false)).findMetric("Tombstones");
// On first node there should not be tombstones.
- //assertEquals(0, tombstoneMetric0.get());
+ assertEquals(0, tombstoneMetric0.get());
if (expTombstone)
assertEquals(removed.size(), tombstoneMetric1.get());
@@ -213,7 +225,7 @@ public class CacheRemoveWithTombstonesTest extends GridCommonAbstractTest {
assert !removed.isEmpty();
- //assertEquals(0, tombstoneMetric0.get());
+ assertEquals(0, tombstoneMetric0.get());
if (expTombstone)
assertEquals(removed.size(), tombstoneMetric1.get());
@@ -242,6 +254,19 @@ public class CacheRemoveWithTombstonesTest extends GridCommonAbstractTest {
assertEquals(0, tombstoneMetric1.get());
}
+ /**
+ *
+ */
+ private void blockRebalance(Ignite node) {
+ final int grpId = groupIdForCache(ignite(0), DEFAULT_CACHE_NAME);
+
+ TestRecordingCommunicationSpi.spi(node).blockMessages(new IgniteBiPredicate<ClusterNode, Message>() {
+ @Override public boolean apply(ClusterNode node, Message msg) {
+ return (msg instanceof GridDhtPartitionSupplyMessage)
+ && ((GridCacheGroupIdMessage)msg).groupId() == grpId;
+ }
+ });
+ }
/**
* @param atomicityMode Cache atomicity mode.
@@ -253,7 +278,7 @@ public class CacheRemoveWithTombstonesTest extends GridCommonAbstractTest {
ccfg.setAtomicityMode(atomicityMode);
ccfg.setCacheMode(PARTITIONED);
ccfg.setBackups(2);
- ccfg.setRebalanceMode(SYNC);
+ ccfg.setRebalanceMode(ASYNC);
ccfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
return ccfg;
[ignite] 03/04: ignite-11704
Posted by sb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sboikov pushed a commit to branch ignite-11704
in repository https://gitbox.apache.org/repos/asf/ignite.git
commit a5ef55f51fb987da7dac75e5fe1d56437e541826
Merge: 8c9bd4f 99fbecd
Author: sboikov <sb...@apache.org>
AuthorDate: Tue Jul 23 06:49:33 2019 +0300
ignite-11704
bin/control.bat | 1 -
bin/control.sh | 1 -
bin/ignite-tf.sh | 1 -
bin/ignite.bat | 1 -
bin/ignite.sh | 1 -
bin/ignitevisorcmd.bat | 1 -
bin/ignitevisorcmd.sh | 1 -
.../benchmarks/jmh/tree/BPlusTreeBenchmark.java | 4 +-
.../benchmarks/jol/GridMetricsJolBenchmark.java | 12 +-
.../thin/JdbcThinDataPageScanPropertySelfTest.java | 9 +-
.../compatibility/PdsWithTtlCompatibilityTest.java | 197 ----------
.../IgniteCompatibilityBasicTestSuite.java | 3 -
modules/compress/pom.xml | 15 +
.../DiskPageCompressionConfigValidationTest.java | 161 ++++++++
.../DiskPageCompressionIntegrationTest.java | 19 +-
.../testsuites/IgnitePdsCompressionTestSuite.java | 2 +
modules/compress/src/test/resources/encryption.jks | Bin 0 -> 6737 bytes
.../main/java/org/apache/ignite/IgniteCache.java | 35 ++
.../apache/ignite/IgniteJdbcThinDataSource.java | 17 -
.../apache/ignite/cache/query/QueryMetrics.java | 6 +-
.../org/apache/ignite/cache/query/ScanQuery.java | 31 --
.../apache/ignite/cache/query/SqlFieldsQuery.java | 32 --
.../org/apache/ignite/cache/query/SqlQuery.java | 31 --
.../ignite/client/ClientConnectionException.java | 18 +-
.../events/CacheConsistencyViolationEvent.java | 69 ++++
.../java/org/apache/ignite/events/EventType.java | 15 +
.../org/apache/ignite/internal/IgniteFeatures.java | 5 +-
.../org/apache/ignite/internal/IgniteKernal.java | 26 +-
.../org/apache/ignite/internal/IgnitionEx.java | 65 ++--
.../ignite/internal/client/thin/ClientChannel.java | 17 +-
.../client/thin/ClientFieldsQueryPager.java | 7 +-
.../internal/client/thin/ClientQueryPager.java | 7 +-
.../ignite/internal/client/thin/ClientUtils.java | 11 +-
.../internal/client/thin/GenericQueryPager.java | 42 +-
.../thin/PayloadInputChannel.java} | 43 ++-
.../internal/client/thin/PayloadOutputChannel.java | 62 +++
.../internal/client/thin/ProtocolVersion.java | 9 +
.../internal/client/thin/ReliableChannel.java | 121 +++---
.../internal/client/thin/TcpClientCache.java | 98 +++--
.../internal/client/thin/TcpClientChannel.java | 276 ++++++++++---
.../internal/client/thin/TcpIgniteClient.java | 56 ++-
.../ignite/internal/commandline/WalCommands.java | 13 +-
.../internal/commandline/cache/CacheCommands.java | 3 +-
.../ignite/internal/jdbc/JdbcConnection.java | 19 +-
.../jdbc/JdbcConnectionValidationTask.java | 54 +++
.../internal/logger/platform/PlatformLogger.java | 2 +-
.../managers/discovery/ClusterMetricsImpl.java | 30 +-
.../IncompleteDeserializationException.java | 53 +++
.../eventstorage/GridEventStorageManager.java | 14 +-
.../internal/metric/IoStatisticsHolderCache.java | 8 +-
.../internal/metric/IoStatisticsHolderIndex.java | 12 +-
.../pagemem/impl/PageMemoryNoStoreImpl.java | 20 +-
.../pagemem/store/IgnitePageStoreManager.java | 4 +-
.../internal/pagemem/wal/record/WALRecord.java | 166 ++++----
.../processors/cache/CacheGroupContext.java | 25 +-
.../processors/cache/CacheGroupMetricsImpl.java | 428 ++++++++++++++++++++-
.../cache/CacheGroupMetricsMXBeanImpl.java | 266 ++-----------
.../processors/cache/CacheMetricsImpl.java | 138 ++++---
.../processors/cache/CacheOperationContext.java | 55 ++-
.../cache/GatewayProtectedCacheProxy.java | 34 ++
.../processors/cache/GridCacheAdapter.java | 376 +++++++++++++++---
.../processors/cache/GridCachePreloader.java | 12 -
.../cache/GridCachePreloaderAdapter.java | 14 -
.../processors/cache/GridCacheProcessor.java | 108 ++++--
.../processors/cache/GridCacheProxyImpl.java | 54 ++-
.../cache/IgniteCacheOffheapManagerImpl.java | 9 +-
.../processors/cache/IgniteCacheProxyImpl.java | 7 +-
.../internal/processors/cache/WalStateManager.java | 13 +-
.../cache/distributed/dht/GridDhtCacheAdapter.java | 3 +
.../distributed/dht/GridPartitionedGetFuture.java | 41 +-
.../distributed/dht/atomic/GridDhtAtomicCache.java | 74 +++-
.../dht/colocated/GridDhtColocatedCache.java | 38 +-
.../dht/preloader/GridDhtPartitionDemander.java | 69 ++--
.../dht/preloader/GridDhtPartitionSupplier.java | 21 +-
.../dht/preloader/GridDhtPreloader.java | 12 -
.../distributed/near/GridNearAtomicCache.java | 3 +-
.../near/GridNearTransactionalCache.java | 2 +
.../cache/distributed/near/GridNearTxLocal.java | 121 +++++-
.../GridNearReadRepairAbstractFuture.java | 221 +++++++++++
.../GridNearReadRepairCheckOnlyFuture.java | 176 +++++++++
.../near/consistency/GridNearReadRepairFuture.java | 166 ++++++++
.../IgniteConsistencyViolationException.java} | 21 +-
.../cache/local/atomic/GridLocalAtomicCache.java | 12 +-
.../processors/cache/mvcc/MvccProcessorImpl.java | 2 +-
.../cache/persistence/CacheDataRowAdapter.java | 19 +-
.../cache/persistence/DataRegionMetricsImpl.java | 133 +++----
.../cache/persistence/DataStorageMetricsImpl.java | 50 +--
.../GridCacheDatabaseSharedManager.java | 60 +--
.../IgniteCacheDatabaseSharedManager.java | 6 +-
.../cache/persistence/file/FilePageStore.java | 16 +-
.../persistence/file/FilePageStoreFactory.java | 6 +-
.../persistence/file/FilePageStoreManager.java | 13 +-
.../cache/persistence/file/FilePageStoreV2.java | 4 +-
.../file/FileVersionCheckingFactory.java | 6 +-
.../cache/persistence/pagemem/PageMemoryImpl.java | 13 +-
.../cache/persistence/tree/BPlusTree.java | 13 +-
.../wal/AbstractWalRecordsIterator.java | 15 +-
.../persistence/wal/FileWriteAheadLogManager.java | 11 +-
.../wal/serializer/RecordV1Serializer.java | 15 +-
.../wal/serializer/RecordV2Serializer.java | 4 +-
.../processors/cache/query/CacheQuery.java | 13 -
.../cache/query/GridCacheQueryAdapter.java | 18 -
.../cache/query/GridCacheQueryManager.java | 10 +-
.../cache/query/GridCacheQueryMetricsAdapter.java | 206 ++++++----
.../cache/transactions/IgniteTxEntry.java | 2 +-
.../IgniteTxImplicitSingleStateImpl.java | 5 +
.../cache/transactions/IgniteTxLocalState.java | 5 +
.../cache/transactions/IgniteTxManager.java | 10 +
.../cache/transactions/IgniteTxStateImpl.java | 5 +
.../processors/cache/tree/CacheDataTree.java | 8 +-
.../cache/version/GridCacheVersionManager.java | 2 +-
.../continuous/GridContinuousProcessor.java | 62 ++-
.../continuous/StartRoutineDiscoveryMessage.java | 41 +-
.../datastructures/GridCacheQueueAdapter.java | 1 +
.../internal/processors/job/GridJobProcessor.java | 36 +-
.../persistence/DistributedMetaStorageImpl.java | 52 ++-
.../processors/metric/GridMetricManager.java | 38 +-
.../internal/processors/metric/MetricRegistry.java | 37 +-
.../{LongMetricImpl.java => AtomicLongMetric.java} | 8 +-
...ngAdderMetricImpl.java => LongAdderMetric.java} | 4 +-
...cImpl.java => LongAdderWithDelegateMetric.java} | 46 +--
.../processors/metric/impl/MetricUtils.java | 30 +-
.../processors/odbc/jdbc/JdbcRequestHandler.java | 5 +-
.../processors/query/GridQueryProcessor.java | 3 +-
.../twostep/messages/GridQueryNextPageRequest.java | 2 -
.../query/schema/SchemaIndexCacheVisitorImpl.java | 6 +-
.../internal/util/future/GridCompoundFuture.java | 14 +-
.../util/io/GridByteArrayOutputStream.java | 5 +
.../util/tostring/GridToStringBuilder.java | 47 ++-
.../util/tostring/GridToStringClassDescriptor.java | 12 +-
.../util/tostring/GridToStringFieldDescriptor.java | 98 ++++-
.../ignite/marshaller/jdk/JdkMarshaller.java | 43 +--
.../ignite/mxbean/CacheGroupMetricsMXBean.java | 15 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 200 ++++++++--
.../ignite/spi/discovery/tcp/TcpDiscoverySpi.java | 5 +-
.../messages/TcpDiscoveryCustomEventMessage.java | 14 +-
.../messages/TcpDiscoveryDuplicateIdMessage.java | 26 ++
.../messages/TcpDiscoveryStatusCheckMessage.java | 33 +-
.../org/apache/ignite/client/AsyncChannelTest.java | 198 ++++++++++
...idEventStorageRuntimeConfigurationSelfTest.java | 10 +-
.../commandline/CommandHandlerParsingTest.java | 44 ++-
.../IncompleteDeserializationExceptionTest.java | 132 +++++++
.../internal/metric/AbstractExporterSpiTest.java | 8 +-
.../internal/metric/IoStatisticsCacheSelfTest.java | 8 +-
...IoStatisticsMetricsLocalMXBeanImplSelfTest.java | 12 +-
.../internal/metric/IoStatisticsSelfTest.java | 18 +-
.../ignite/internal/metric/MetricsSelfTest.java | 36 +-
.../pagemem/impl/PageMemoryNoLoadSelfTest.java | 4 +-
.../pagemem/wal/record/WALRecordTest.java} | 47 +--
...csMBeanTest.java => CacheGroupMetricsTest.java} | 125 +++---
.../cache/IgniteClusterActivateDeactivateTest.java | 52 +--
...usterActivateDeactivateTestWithPersistence.java | 4 +
...eanTest.java => MvccCacheGroupMetricsTest.java} | 2 +-
.../consistency/AbstractFullSetReadRepairTest.java | 242 ++++++++++++
.../cache/consistency/AbstractReadRepairTest.java | 336 ++++++++++++++++
.../cache/consistency/AtomicReadRepairTest.java | 191 +++++++++
.../ExplicitTransactionalReadRepairTest.java | 149 +++++++
.../ImplicitTransactionalReadRepairTest.java | 99 +++++
...icatedExplicitTransactionalReadRepairTest.java} | 21 +-
...icatedImplicitTransactionalReadRepairTest.java} | 18 +-
...BackupExplicitTransactionalReadRepairTest.java} | 9 +-
...BackupImplicitTransactionalReadRepairTest.java} | 9 +-
.../GridCacheDhtEvictionNearReadersSelfTest.java | 2 +-
.../GridCacheRebalancingWithAsyncClearingTest.java | 12 +-
...tePdsRestartAfterFailedToWriteMetaPageTest.java | 201 ++++++++++
.../persistence/IgnitePdsTaskCancelingTest.java | 3 +-
...IgnitePdsCacheWalDisabledOnRebalancingTest.java | 32 +-
.../db/IgnitePdsReserveWalSegmentsTest.java | 6 +-
.../db/wal/WalDeletionArchiveAbstractTest.java | 5 +-
.../IgniteAbstractWalIteratorInvalidCrcTest.java | 2 +-
.../pagemem/BPlusTreePageMemoryImplTest.java | 4 +-
.../BPlusTreeReuseListPageMemoryImplTest.java | 4 +-
.../IgnitePageMemReplaceDelayedWriteUnitTest.java | 3 +-
.../pagemem/IndexStoragePageMemoryImplTest.java | 4 +-
.../persistence/pagemem/NoOpPageStoreManager.java | 4 +-
.../pagemem/PageMemoryImplNoLoadTest.java | 4 +-
.../persistence/pagemem/PageMemoryImplTest.java | 5 +-
.../pagemem/PageMemoryNoStoreLeakTest.java | 4 +-
.../cache/query/CacheDataPageScanQueryTest.java | 24 +-
...ueryRemoteFilterMissingInClassPathSelfTest.java | 148 +++++--
.../cluster/BaselineAutoAdjustInMemoryTest.java | 26 ++
.../processors/database/BPlusTreeSelfTest.java | 9 +-
.../processors/database/CacheFreeListSelfTest.java | 18 +-
.../database/DataRegionMetricsSelfTest.java | 27 +-
.../processors/database/IndexStorageSelfTest.java | 4 +-
.../jobmetrics/GridJobMetricsSelfTest.java | 32 +-
.../junits/multijvm/IgniteCacheProcessProxy.java | 5 +
.../ignite/testsuites/IgniteBasicTestSuite.java | 22 +-
.../IgniteCacheDataStructuresSelfTestSuite.java | 19 +-
.../testsuites/IgniteCacheMvccTestSuite7.java | 8 +-
.../ignite/testsuites/IgniteCacheTestSuite7.java | 4 +-
.../ignite/testsuites/IgnitePdsTestSuite4.java | 5 +
.../GridInternalTaskUnusedWalSegmentsTest.java | 17 +-
.../ignite/internal/managers/discovery/Wrapper.ser | Bin 0 -> 260 bytes
.../processors/query/h2/IgniteH2Indexing.java | 20 +-
.../processors/query/h2/QueryParameters.java | 5 +-
.../internal/processors/query/h2/dml/DmlUtils.java | 2 +-
.../view/SqlSystemViewCacheGroupsIOStatistics.java | 10 +-
.../query/h2/twostep/GridMapQueryExecutor.java | 1 -
.../visor/verify/ValidateIndexesClosure.java | 13 +-
.../org/apache/ignite/client/ClientTestSuite.java | 3 +-
.../cache/CacheAbstractQueryMetricsSelfTest.java | 12 +-
...st.java => CacheGroupMetricsWithIndexTest.java} | 62 ++-
.../cache/IgniteErrorOnRebalanceTest.java | 2 +
.../IgniteCacheReplicatedQuerySelfTest.java | 27 +-
.../processors/cache/index/H2RowCacheSelfTest.java | 15 +-
.../cache/index/SchemaExchangeSelfTest.java | 11 +-
.../query/h2/IgniteSqlQueryMinMaxTest.java | 2 +
.../processors/query/h2/QueryDataPageScanTest.java | 31 +-
.../query/h2/database/InlineIndexHelperTest.java | 12 +-
.../IgniteCacheWithIndexingTestSuite.java | 4 +-
.../cpp/binary/include/ignite/binary/binary_enum.h | 204 ++++++++++
.../include/ignite/binary/binary_enum_entry.h | 107 ++++++
.../include/ignite/binary/binary_raw_reader.h | 23 ++
.../include/ignite/binary/binary_raw_writer.h | 21 +
.../binary/include/ignite/binary/binary_reader.h | 23 ++
.../cpp/binary/include/ignite/binary/binary_type.h | 8 +-
.../binary/include/ignite/binary/binary_writer.h | 22 ++
.../include/ignite/impl/binary/binary_common.h | 6 +
.../ignite/impl/binary/binary_reader_impl.h | 84 +++-
.../include/ignite/impl/binary/binary_utils.h | 82 ++--
.../ignite/impl/binary/binary_writer_impl.h | 69 +++-
.../ignite/impl/interop/interop_input_stream.h | 4 +-
.../platforms/cpp/binary/project/vs/binary.vcxproj | 2 +
.../cpp/binary/project/vs/binary.vcxproj.filters | 6 +
.../cpp/binary/src/binary/binary_raw_reader.cpp | 5 +
.../cpp/binary/src/binary/binary_raw_writer.cpp | 5 +
.../cpp/binary/src/binary/binary_reader.cpp | 5 +
.../cpp/binary/src/binary/binary_writer.cpp | 5 +
.../binary/src/impl/binary/binary_reader_impl.cpp | 85 ++--
.../cpp/binary/src/impl/binary/binary_utils.cpp | 43 ++-
.../binary/src/impl/binary/binary_writer_impl.cpp | 21 +
.../core-test/include/ignite/binary_test_defs.h | 58 +++
.../cpp/core-test/src/binary_object_test.cpp | 117 ++++++
modules/platforms/cpp/core-test/src/cache_test.cpp | 50 ++-
.../ExpiryCacheHolderTest.cs | 7 +
.../Cache/CacheTestAsyncWrapper.cs | 12 +
.../dotnet/Apache.Ignite.Core/Cache/ICache.cs | 13 +
.../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs | 34 +-
.../Apache.Ignite.Core/Impl/Cache/CacheOp.cs | 3 +-
.../dotnet/Apache.Ignite.Core/Impl/Ignite.cs | 2 +-
modules/sqlline/bin/sqlline.bat | 1 -
modules/sqlline/bin/sqlline.sh | 1 -
.../web-console/web-agent/bin/ignite-web-agent.bat | 1 -
.../web-console/web-agent/bin/ignite-web-agent.sh | 1 -
parent/pom.xml | 3 +-
246 files changed, 7361 insertions(+), 2439 deletions(-)
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
index 5808db6,f26bf14..e002037
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
@@@ -29,8 -29,7 +29,8 @@@ import org.apache.ignite.internal.proce
import org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore;
import org.apache.ignite.internal.processors.metric.MetricRegistry;
import org.apache.ignite.internal.processors.metric.impl.HitRateMetric;
- import org.apache.ignite.internal.processors.metric.impl.LongAdderMetricImpl;
- import org.apache.ignite.internal.processors.metric.impl.LongMetricImpl;
++import org.apache.ignite.internal.processors.metric.impl.LongAdderMetric;
+ import org.apache.ignite.internal.processors.metric.impl.AtomicLongMetric;
import org.apache.ignite.internal.processors.metric.impl.MetricUtils;
import org.apache.ignite.internal.util.tostring.GridToStringExclude;
import org.apache.ignite.internal.util.typedef.internal.S;
@@@ -160,11 -159,8 +160,11 @@@ public class CacheMetricsImpl implement
private final HitRateMetric rebalancingBytesRate;
/** Number of currently clearing partitions for rebalancing. */
- private final LongMetricImpl rebalanceClearingPartitions;
+ private final AtomicLongMetric rebalanceClearingPartitions;
+ /** */
- private LongAdderMetricImpl tombstones;
++ private LongAdderMetric tombstones;
+
/** Cache metrics. */
@GridToStringExclude
private transient CacheMetricsImpl delegate;
@@@ -314,10 -308,8 +312,10 @@@
REBALANCE_RATE_INTERVAL,
20);
- rebalanceClearingPartitions = mreg.metric("RebalanceClearingPartitionsLeft",
+ rebalanceClearingPartitions = mreg.longMetric("RebalanceClearingPartitionsLeft",
"Number of partitions need to be cleared before actual rebalance start.");
+
+ tombstones = mreg.longAdderMetric("Tombstones", "Number of tombstone entries");
}
/**
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CacheDataRowAdapter.java
index df46885,06e7214..f168903
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CacheDataRowAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CacheDataRowAdapter.java
@@@ -52,6 -52,6 +52,7 @@@ import static org.apache.ignite.interna
import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.MVCC_OP_COUNTER_NA;
import static org.apache.ignite.internal.processors.cache.persistence.CacheDataRowAdapter.RowData.KEY_ONLY;
import static org.apache.ignite.internal.processors.cache.persistence.CacheDataRowAdapter.RowData.LINK_WITH_HEADER;
++import static org.apache.ignite.internal.processors.cache.persistence.CacheDataRowAdapter.RowData.TOMBSTONES;
/**
* Cache data row adapter.
@@@ -261,9 -261,9 +262,23 @@@ public class CacheDataRowAdapter implem
incomplete = readIncomplete(incomplete, sharedCtx, coctx, pageMem,
grpId, pageAddr, itemId, io, rowData, readCacheId, skipVer);
-- if (incomplete == null || (rowData == KEY_ONLY && key != null))
++ if (incomplete == null)
return;
++ if (rowData == KEY_ONLY) {
++ if (key != null)
++ return;
++ }
++ else if (rowData == TOMBSTONES) {
++ // TODO IGNITE-11704.
++ if (val != null && !sharedCtx.database().isTombstone(this)) {
++ verReady = true;
++ ver = null;
++
++ return;
++ }
++ }
++
nextLink = incomplete.getNextLink();
}
finally {
@@@ -498,14 -498,6 +513,14 @@@
int len = PageUtils.getInt(addr, off);
off += 4;
+ boolean tombstones = rowData == RowData.TOMBSTONES;
+
+ if (tombstones && !sharedCtx.database().isTombstone(addr + off + len + 1)) {
- verReady = true;
++ verReady = true; // Mark as ready, no need to read any data.
+
+ return;
+ }
+
if (rowData != RowData.NO_KEY && rowData != RowData.NO_KEY_WITH_HINTS) {
byte type = PageUtils.getByte(addr, off);
off++;
[ignite] 04/04: ignite-11704
Posted by sb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sboikov pushed a commit to branch ignite-11704
in repository https://gitbox.apache.org/repos/asf/ignite.git
commit 86bc43e24e2a5cec9060470b8958631605e50963
Author: sboikov <sb...@apache.org>
AuthorDate: Tue Jul 23 07:23:40 2019 +0300
ignite-11704
---
.../internal/processors/cache/CacheGroupContext.java | 2 +-
.../processors/cache/IgniteCacheOffheapManager.java | 2 --
.../processors/cache/IgniteCacheOffheapManagerImpl.java | 15 +--------------
.../distributed/dht/topology/GridDhtLocalPartition.java | 3 ---
.../processors/cache/persistence/CacheDataRowAdapter.java | 4 +++-
5 files changed, 5 insertions(+), 21 deletions(-)
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java
index ffff101..cbdb3e8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java
@@ -1293,7 +1293,7 @@ public class CacheGroupContext {
}
public boolean supportsTombstone() {
- return !hasAtomicCaches && !mvccEnabled && !isLocal();
+ return !sharedGroup() && !hasAtomicCaches && !mvccEnabled && !isLocal();
}
public boolean createTombstone(@Nullable GridDhtLocalPartition part) {
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java
index c883343..2272439 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java
@@ -453,8 +453,6 @@ public interface IgniteCacheOffheapManager {
*/
public GridIterator<CacheDataRow> partitionIterator(final int part, boolean withTombstones) throws IgniteCheckedException;
- public GridIterator<CacheDataRow> tombstonesIterator(final int part) throws IgniteCheckedException;
-
/**
* @param part Partition number.
* @param topVer Topology version.
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
index f653342..6683237 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
@@ -898,19 +898,6 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
return iterator(CU.UNDEFINED_CACHE_ID, singletonIterator(data), null, null, withTombstones);
}
- /** {@inheritDoc} */
- @Override public GridIterator<CacheDataRow> tombstonesIterator(int part) {
- assert locCacheDataStore == null;
-
- CacheDataStore data = partitionData(part);
-
- if (data == null)
- return new GridEmptyCloseableIterator<>();
-
- // TODO IGNITE-11704.
- return iterator(CU.UNDEFINED_CACHE_ID, singletonIterator(data), null, null, true);
- }
-
/**
*
* @param cacheId Cache ID.
@@ -2940,7 +2927,7 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
@Override public GridCursor<? extends CacheDataRow> cursor(boolean withTombstones) throws IgniteCheckedException {
GridCursor<? extends CacheDataRow> cur = dataTree.find(null, null);
- return withTombstones ? cursorSkipEmpty(cur) : cursorSkipTombstone(cur);
+ return withTombstones ? cur : cursorSkipTombstone(cur);
}
private GridCursor<? extends CacheDataRow> cursorSkipEmpty(final GridCursor<? extends CacheDataRow> cur) {
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtLocalPartition.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtLocalPartition.java
index b5a63e6..d24cfee 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtLocalPartition.java
@@ -1157,9 +1157,6 @@ public class GridDhtLocalPartition extends GridCacheConcurrentMapImpl implements
while (cur.next()) {
CacheDataRow row = cur.get();
- if (!grp.offheap().isTombstone(row))
- continue;
-
assert row.key() != null;
assert row.version() != null;
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CacheDataRowAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CacheDataRowAdapter.java
index f168903..1be2bb5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CacheDataRowAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CacheDataRowAdapter.java
@@ -272,8 +272,10 @@ public class CacheDataRowAdapter implements CacheDataRow {
else if (rowData == TOMBSTONES) {
// TODO IGNITE-11704.
if (val != null && !sharedCtx.database().isTombstone(this)) {
- verReady = true;
ver = null;
+ key = null;
+ val = null;
+ verReady = true;
return;
}