[
https://issues.apache.org/jira/browse/IGNITE-13160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17217991#comment-17217991
]
Ignite TC Bot commented on IGNITE-13160:
----------------------------------------
{panel:title=Branch: [pull/8378/head] Base: [master] : Possible Blockers
(15)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}
{color:#d04437}MVCC PDS 2{color} [[tests 0 TIMEOUT , Exit Code
|https://ci.ignite.apache.org/viewLog.html?buildId=5679248]]
{color:#d04437}Cache 6{color} [[tests
1|https://ci.ignite.apache.org/viewLog.html?buildId=5679208]]
* IgniteCacheTestSuite6:
CacheExchangeMergeTest.testNoConcurrentModificationExceptionAfterMergeExchanges
- Test has low fail rate in base branch 0,0% and is not flaky
{color:#d04437}MVCC Cache 1{color} [[tests
1|https://ci.ignite.apache.org/viewLog.html?buildId=5679238]]
* IgniteCacheMvccTestSuite1: DataStreamerImplSelfTest.testAddDataFromMap - Test
has low fail rate in base branch 0,0% and is not flaky
{color:#d04437}Queries 2{color} [[tests
2|https://ci.ignite.apache.org/viewLog.html?buildId=5679167]]
* IgniteBinaryCacheQueryTestSuite2:
SqlDataTypesCoverageTests.testVarcharDataType[atomicityMode=ATOMIC,
cacheMode=PARTITIONED, ttlFactory=null, backups=2, evictionFactory=null,
onheapCacheEnabled=false, writeSyncMode=FULL_ASYNC, persistenceEnabled=false] -
Test has low fail rate in base branch 0,0% and is not flaky
* IgniteBinaryCacheQueryTestSuite2:
DynamicEnableIndexingConcurrentSelfTest.testOperationChaining[cacheMode=PARTITIONED,atomicityMode=TRANSACTIONAL_SNAPSHOT]
- Test has low fail rate in base branch 0,0% and is not flaky
{color:#d04437}Cache 9{color} [[tests
1|https://ci.ignite.apache.org/viewLog.html?buildId=5679211]]
* IgniteCacheTestSuite9:
TxPartitionCounterStateConsistencyHistoryRebalanceTest.testPartitionConsistencyCancelledRebalanceCoordinatorIsDemander
- Test has low fail rate in base branch 0,0% and is not flaky
{color:#d04437}Basic 1{color} [[tests
1|https://ci.ignite.apache.org/viewLog.html?buildId=5679183]]
* IgniteBasicTestSuite: BPlusTreeSelfTest.testPutSizeLivelock - Test has low
fail rate in base branch 0,0% and is not flaky
{color:#d04437}Control Utility{color} [[tests 0 TIMEOUT
|https://ci.ignite.apache.org/viewLog.html?buildId=5679257]]
{color:#d04437}MVCC Cache 6{color} [[tests
1|https://ci.ignite.apache.org/viewLog.html?buildId=5679243]]
* IgniteCacheMvccTestSuite6: PendingExchangeTest.testWithShortAfinityHistory -
Test has low fail rate in base branch 0,0% and is not flaky
{color:#d04437}Examples (LGPL){color} [[tests
6|https://ci.ignite.apache.org/viewLog.html?buildId=5679234]]
* IgniteLgplExamplesSelfTestSuite:
ComputeScheduleExampleSelfTest.testComputeScheduleExample - Test has low fail
rate in base branch 0,0% and is not flaky
* IgniteLgplExamplesSelfTestSuite:
SpatialQueryExampleSelfTest.testSpatialQueryExample - Test has low fail rate in
base branch 0,0% and is not flaky
* IgniteLgplExamplesSelfTestSuite:
HibernateL2CacheExampleSelfTest.testHibernateL2CacheExample - Test has low fail
rate in base branch 0,0% and is not flaky
* IgniteLgplExamplesSelfTestSuite:
SpatialQueryExampleMultiNodeSelfTest.testSpatialQueryExample - Test has low
fail rate in base branch 0,0% and is not flaky
* IgniteLgplExamplesSelfTestSuite:
ComputeScheduleExampleMultiNodeSelfTest.testComputeScheduleExample - Test has
low fail rate in base branch 0,0% and is not flaky
* IgniteLgplExamplesSelfTestSuite:
HibernateL2CacheExampleMultiNodeSelfTest.testHibernateL2CacheExample - Test has
low fail rate in base branch 0,0% and is not flaky
{panel}
{panel:title=Branch: [pull/8378/head] Base: [master] : New Tests
(10)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Platform .NET (Core Linux){color} [[tests
5|https://ci.ignite.apache.org/viewLog.html?buildId=5679225]]
* {color:#013220}dll:
QueryEntityMetadataRegistrationTest.TestCacheStartFromCodeRegistersMetaForQueryEntityTypes
- PASSED{color}
* {color:#013220}dll:
QueryEntityMetadataRegistrationTest.TestCacheStartFromSpringRegistersMetaForQueryEntityTypes
- PASSED{color}
* {color:#013220}dll:
QueryEntityMetadataRegistrationTest.TestCacheStartFromCodeSkipsInvalidQueryEntityTypes
- PASSED{color}
* {color:#013220}dll: AffinityTest.TestAffinityKeyMappedWithQueryEntity -
PASSED{color}
* {color:#013220}dll:
AffinityTest.TestAffinityKeyMappedWithQueryEntitySpringXml - PASSED{color}
{color:#00008b}Platform .NET{color} [[tests
5|https://ci.ignite.apache.org/viewLog.html?buildId=5679224]]
* {color:#013220}exe:
AffinityTest.TestAffinityKeyMappedWithQueryEntitySpringXml - PASSED{color}
* {color:#013220}exe: AffinityTest.TestAffinityKeyMappedWithQueryEntity -
PASSED{color}
* {color:#013220}exe:
QueryEntityMetadataRegistrationTest.TestCacheStartFromSpringRegistersMetaForQueryEntityTypes
- PASSED{color}
* {color:#013220}exe:
QueryEntityMetadataRegistrationTest.TestCacheStartFromCodeSkipsInvalidQueryEntityTypes
- PASSED{color}
* {color:#013220}exe:
QueryEntityMetadataRegistrationTest.TestCacheStartFromCodeRegistersMetaForQueryEntityTypes
- PASSED{color}
{panel}
[TeamCity *--> Run :: All*
Results|https://ci.ignite.apache.org/viewLog.html?buildId=5679260&buildTypeId=IgniteTests24Java8_RunAll]
> .NET: wrong affinity key registration with AffinityKeyMapped attribute
> ----------------------------------------------------------------------
>
> Key: IGNITE-13160
> URL: https://issues.apache.org/jira/browse/IGNITE-13160
> Project: Ignite
> Issue Type: Bug
> Components: platforms
> Affects Versions: 2.8.1
> Reporter: Alexandr Shapkin
> Assignee: Pavel Tupitsyn
> Priority: Major
> Fix For: 2.10
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> When QueryEntities is set alongside a custom key that utilizes the
> AffinityKeyMapped attribute, the field won't be taken into account for some
> reason. When QueryEntities configuration gets removed, all works fine,
> setting KeyConfiguration manually helps as well. At the same time, the
> BinaryType registration itself looks fine.
> After the investigation, it turned out that affinityKey field is not being
> registered on cache registration, and null is being cached instead. Later on
> Ignite correctly tries to register a custom class as a key, but it's never
> being updated internally case the real value is already cached.
>
> NOTE: there is a workaround - you need to specify the key configuration
> explicitly:
> {code:java}
> cacheConfiguration.KeyConfiguration = new List<CacheKeyConfiguration>(1)
> {
> //affinityKey should be auto adjusted with Reflection
> new CacheKeyConfiguration(typeof(MyKey))
> };
>
> {code}
>
> Reproducer (add to the AffinityTest.cs):
> {code:java}
> /// <summary>
> /// Tests AffinityKeyMapped attribute should map to the same
> partitions
> /// for the same field value.
> /// </summary>
> [Test]
> public void TestCustomAffinity()
> {
> IIgnite g = Ignition.GetIgnite("grid-0");
> var cacheCfg = new CacheConfiguration("mycache")
> {
> // Without QueryEntities tests passes.
> QueryEntities = new List<QueryEntity>()
> {
> new QueryEntity(typeof(MyKey), typeof(int))
> }
> };
> g.GetOrCreateCache<MyKey, int>(cacheCfg);
> var key1 = new MyKey {Data = "data1", AffinityKey = 1};
> var key2 = new MyKey {Data = "data2", AffinityKey = 1};
> ICacheAffinity aff = g.GetAffinity(cacheCfg.Name);
> Assert.AreEqual(aff.GetPartition(key1), aff.GetPartition(key2));
> }
> public class MyKey
> {
> [QuerySqlField]
> public string Data { get; set; }
> [AffinityKeyMapped]
> public long AffinityKey { get; set; }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)