[ignite-teamcity-bot] branch master updated: Sync gap fix for case there is a lot of non-modified builds (#139)

2019-07-30 Thread dpavlov
This is an automated email from the ASF dual-hosted git repository.

dpavlov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git


The following commit(s) were added to refs/heads/master by this push:
 new 397be32  Sync gap fix for case there is a lot of non-modified builds 
(#139)
397be32 is described below

commit 397be3270491c3928d40d157491b71e436c7f653
Author: Dmitriy Pavlov 
AuthorDate: Tue Jul 30 17:25:17 2019 +0300

Sync gap fix for case there is a lot of non-modified builds (#139)
---
 .../org/apache/ignite/ci/jobs/CheckQueueJob.java   |   2 +
 .../apache/ignite/tcbot/common/util/TimeUtil.java  |   2 +-
 .../tcbot/persistence/IgniteStringCompactor.java   |   2 +-
 .../apache/ignite/tcignited/ITeamcityIgnited.java  |  24 ++--
 .../ignite/tcignited/TeamcityIgnitedImpl.java  |  21 ++--
 .../tcignited/build/ProactiveFatBuildSync.java |   3 -
 .../ignite/tcignited/buildref/BuildRefDao.java |   4 +-
 .../ignite/tcignited/buildref/BuildRefSync.java| 121 -
 8 files changed, 127 insertions(+), 52 deletions(-)

diff --git 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/jobs/CheckQueueJob.java
 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/jobs/CheckQueueJob.java
index 985d358..537792f 100644
--- 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/jobs/CheckQueueJob.java
+++ 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/jobs/CheckQueueJob.java
@@ -172,6 +172,8 @@ public class CheckQueueJob implements Runnable {
 
 String selfLogin = creds.getUser(srvId);
 
+tcIgn.actualizeRecentBuildRefs();
+
 StringBuilder res = new StringBuilder();
 
 for (ITrackedChain chain : chains) {
diff --git 
a/tcbot-common/src/main/java/org/apache/ignite/tcbot/common/util/TimeUtil.java 
b/tcbot-common/src/main/java/org/apache/ignite/tcbot/common/util/TimeUtil.java
index c596ab2..c77937b 100644
--- 
a/tcbot-common/src/main/java/org/apache/ignite/tcbot/common/util/TimeUtil.java
+++ 
b/tcbot-common/src/main/java/org/apache/ignite/tcbot/common/util/TimeUtil.java
@@ -80,7 +80,7 @@ public class TimeUtil {
 return new 
SimpleDateFormat("MMdd'T'HHmmssZ").parse(date).getTime();
 }
 catch (ParseException e) {
-System.err.println("Exception happened when TimeUtilo tried to 
convert date into timestamp [" +
+System.err.println("Exception happened when TimeUtil tried to 
convert date into timestamp [" +
 "date=" + date + ", err=" + e.getMessage() + ']');
 }
 
diff --git 
a/tcbot-persistence/src/main/java/org/apache/ignite/tcbot/persistence/IgniteStringCompactor.java
 
b/tcbot-persistence/src/main/java/org/apache/ignite/tcbot/persistence/IgniteStringCompactor.java
index 0f1918c..671e5d2 100644
--- 
a/tcbot-persistence/src/main/java/org/apache/ignite/tcbot/persistence/IgniteStringCompactor.java
+++ 
b/tcbot-persistence/src/main/java/org/apache/ignite/tcbot/persistence/IgniteStringCompactor.java
@@ -124,7 +124,7 @@ public class IgniteStringCompactor implements 
IStringCompactor {
 Iterator> 
iter = qryCursor.iterator();
 
 if (!iter.hasNext()) {
-System.err.println("Not found string by id " + id);
+System.err.println("Error: String Not found string by id " + id);
 
 return null;
 }
diff --git 
a/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/ITeamcityIgnited.java
 
b/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/ITeamcityIgnited.java
index a7001b6..17f82bf 100644
--- 
a/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/ITeamcityIgnited.java
+++ 
b/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/ITeamcityIgnited.java
@@ -17,32 +17,28 @@
 package org.apache.ignite.tcignited;
 
 import com.google.common.base.Strings;
-
 import java.io.File;
 import java.util.Collection;
 import java.util.Date;
-import java.util.Map;
 import java.util.List;
+import java.util.Map;
 import java.util.Optional;
 import java.util.Set;
-import java.util.concurrent.CompletableFuture;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
-
 import org.apache.ignite.ci.teamcity.ignited.BuildRefCompacted;
-import org.apache.ignite.tcbot.common.conf.ITcServerConfig;
-import org.apache.ignite.tcignited.history.IRunHistory;
-import org.apache.ignite.tcignited.history.IRunStat;
-import org.apache.ignite.tcignited.history.ISuiteRunHistory;
-import org.apache.ignite.tcservice.model.agent.Agent;
-import org.apache.ignite.tcservice.model.mute.MuteInfo;
-import org.apache.ignite.tcservice.model.result.Build;
 import org.apache.ignite.ci.teamcity.ignited.buildcondition.BuildCondition;
 import org.apache.ignite.ci.teamcity.ignited.buildtype.BuildTypeCompacted;
 import org.apache.ignite.ci.teamcity.ignited.buildtype.BuildTypeRefCompacted;
 import 

[ignite] branch master updated (1ea1505 -> 88ab8f7)

2019-07-30 Thread nizhikov
This is an automated email from the ASF dual-hosted git repository.

nizhikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git.


from 1ea1505  IGNITE-7883 Cluster can have inconsistent affinity 
configuration.
 add 88ab8f7  IGNITE-11961:  JMX metrics for PME timings (#6701)

No new revisions were added by this update.

Summary of changes:
 .../managers/discovery/ClusterMetricsImpl.java |  16 ++-
 .../cache/GridCachePartitionExchangeManager.java   |  47 +++
 .../preloader/GridDhtPartitionsExchangeFuture.java |  36 +++--
 .../processors/metric/GridMetricManager.java   |  27 +++-
 .../spi/discovery/ClusterMetricsSelfTest.java  | 147 +
 .../ignite/testsuites/IgniteUtilSelfTestSuite.java |   2 +
 6 files changed, 259 insertions(+), 16 deletions(-)
 create mode 100644 
modules/core/src/test/java/org/apache/ignite/spi/discovery/ClusterMetricsSelfTest.java



[ignite-teamcity-bot] branch master updated: Removing empty method

2019-07-30 Thread dpavlov
This is an automated email from the ASF dual-hosted git repository.

dpavlov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git


The following commit(s) were added to refs/heads/master by this push:
 new 7b242ed  Removing empty method
7b242ed is described below

commit 7b242eda42607bf71003906a0996ea128f6f730e
Author: Dmitriy Pavlov 
AuthorDate: Tue Jul 30 15:06:32 2019 +0300

Removing empty method
---
 .../main/java/org/apache/ignite/tcignited/TeamcityIgnitedImpl.java   | 2 --
 .../main/java/org/apache/ignite/tcignited/buildref/BuildRefSync.java | 5 -
 2 files changed, 7 deletions(-)

diff --git 
a/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/TeamcityIgnitedImpl.java
 
b/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/TeamcityIgnitedImpl.java
index ec8804d..000bff7 100644
--- 
a/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/TeamcityIgnitedImpl.java
+++ 
b/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/TeamcityIgnitedImpl.java
@@ -485,8 +485,6 @@ public class TeamcityIgnitedImpl implements 
ITeamcityIgnited {
 public void ensureActualizeRequested() {
 scheduler.sheduleNamed(taskName("actualizeRecentBuildRefs"), () -> 
actualizeRecentBuildRefs(srvCode), 2, TimeUnit.MINUTES);
 
-buildRefSync.ensureActualizeRequested();
-
 // schedule find missing later
 fatBuildSync.ensureActualizationRequested(srvCode, conn);
 }
diff --git 
a/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/buildref/BuildRefSync.java
 
b/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/buildref/BuildRefSync.java
index 37ab754..bd8af66 100644
--- 
a/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/buildref/BuildRefSync.java
+++ 
b/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/buildref/BuildRefSync.java
@@ -115,9 +115,4 @@ public class BuildRefSync {
 private List cacheKeysToBuildIds(Collection 
cacheKeysUpdated) {
 return 
cacheKeysUpdated.stream().map(BuildRefDao::cacheKeyToBuildId).collect(Collectors.toList());
 }
-
-
-public void ensureActualizeRequested() {
-
-}
 }



[ignite-teamcity-bot] branch master updated: Add logging from monitoring interceptor, all tasks added to monitoring log

2019-07-30 Thread dpavlov
This is an automated email from the ASF dual-hosted git repository.

dpavlov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git


The following commit(s) were added to refs/heads/master by this push:
 new aeb9c40  Add logging from monitoring interceptor, all tasks added to 
monitoring log
aeb9c40 is described below

commit aeb9c40d53885727460ed7b3ecff2ce4a37a1fa7
Author: Dmitriy Pavlov 
AuthorDate: Tue Jul 30 14:58:45 2019 +0300

Add logging from monitoring interceptor, all tasks added to monitoring log
---
 .../ci/tcbot/TcBotBusinessServicesModule.java  |  48 
 .../TcBotWebAppModule.java}|  49 +++--
 .../java/org/apache/ignite/ci/web/CtxListener.java |  12 +-
 .../ci/web/rest/monitoring/MonitoringService.java  |   4 +-
 .../org/apache/ignite/ci/di/DiContextTest.java |   6 +-
 .../org/apache/ignite/ci/di/cache/CachingTest.java |   1 +
 .../ignite/tcbot/common/TcBotCommonModule.java |  18 ++-
 .../interceptor}/AutoProfilingInterceptor.java |   2 +-
 .../AutoProfilingInterceptorModule.java|  22 ++--
 .../interceptor}/GuavaCachedInterceptor.java   |   8 +-
 .../common/interceptor}/GuavaCachedModule.java |   3 +-
 .../tcbot/common/interceptor/MonitoredTask.java|   5 +
 .../interceptor}/MonitoredTaskInterceptor.java | 122 +++--
 .../MonitoredTaskInterceptorModule.java|  23 ++--
 .../apache/ignite/tcbot/common/util/TimeUtil.java  |   4 +
 .../ignite/tcbot/engine/TcBotEngineModule.java |   7 ++
 .../persistence/scheduler/TcBotScheduler.java  |   2 +-
 17 files changed, 195 insertions(+), 141 deletions(-)

diff --git 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/TcBotBusinessServicesModule.java
 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/TcBotBusinessServicesModule.java
deleted file mode 100644
index 804bb89..000
--- 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/TcBotBusinessServicesModule.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ignite.ci.tcbot;
-
-import com.google.inject.AbstractModule;
-import com.google.inject.internal.SingletonScope;
-import org.apache.ignite.ci.issue.IssuesStorage;
-import org.apache.ignite.tcbot.engine.buildtime.BuildTimeService;
-import org.apache.ignite.tcbot.engine.conf.ITcBotConfig;
-import org.apache.ignite.ci.tcbot.conf.LocalFilesBasedConfig;
-import org.apache.ignite.ci.tcbot.issue.IIssuesStorage;
-import org.apache.ignite.ci.tcbot.trends.MasterTrendsService;
-import org.apache.ignite.ci.tcbot.user.IUserStorage;
-import org.apache.ignite.ci.tcbot.user.UserAndSessionsStorage;
-import org.apache.ignite.tcbot.common.conf.IDataSourcesConfigSupplier;
-
-/**
- * TC Bot self services mapping (without 3rd party integrations configuration.
- */
-public class TcBotBusinessServicesModule extends AbstractModule {
-/** {@inheritDoc} */
-@Override protected void configure() {
-bind(ITcBotConfig.class).to(LocalFilesBasedConfig.class).in(new 
SingletonScope());
-//todo remove
-
bind(IDataSourcesConfigSupplier.class).to(LocalFilesBasedConfig.class).in(new 
SingletonScope());
-bind(IUserStorage.class).to(UserAndSessionsStorage.class).in(new 
SingletonScope());
-bind(IIssuesStorage.class).to(IssuesStorage.class).in(new 
SingletonScope());
-bind(MasterTrendsService.class).in(new SingletonScope());
-bind(ITcBotBgAuth.class).to(TcBotBgAuthImpl.class).in(new 
SingletonScope());
-
-//todo move to bot engine module
-bind(BuildTimeService.class).in(new SingletonScope());
-}
-}
diff --git 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/di/IgniteTcBotModule.java
 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/TcBotWebAppModule.java
similarity index 75%
rename from 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/di/IgniteTcBotModule.java
rename to 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/TcBotWebAppModule.java
index 67f5ad1..e613ccf 100644
--- 

[ignite] branch master updated: IGNITE-7883 Cluster can have inconsistent affinity configuration.

2019-07-30 Thread agura
This is an automated email from the ASF dual-hosted git repository.

agura pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 1ea1505  IGNITE-7883 Cluster can have inconsistent affinity 
configuration.
1ea1505 is described below

commit 1ea1505872b0dce8386ca3975a346fbfd2482dad
Author: a-polyakov 
AuthorDate: Tue Jul 30 14:52:34 2019 +0300

IGNITE-7883 Cluster can have inconsistent affinity configuration.

Signed-off-by: Andrey Gura 
---
 .../apache/ignite/cache/CacheKeyConfiguration.java |  26 ++
 .../processors/cache/ClusterCachesInfo.java|   3 +
 .../internal/processors/cache/GridCacheUtils.java  | 152 +--
 .../CacheAffinityKeyConfigurationMismatchTest.java | 287 +
 .../ignite/testsuites/IgniteCacheTestSuite.java|   2 +
 5 files changed, 451 insertions(+), 19 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/CacheKeyConfiguration.java 
b/modules/core/src/main/java/org/apache/ignite/cache/CacheKeyConfiguration.java
index 33e5881..2fcf232 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/CacheKeyConfiguration.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/CacheKeyConfiguration.java
@@ -19,6 +19,7 @@ package org.apache.ignite.cache;
 
 import java.io.Serializable;
 import java.lang.reflect.Field;
+import java.util.Objects;
 import org.apache.ignite.cache.affinity.AffinityKeyMapped;
 import org.apache.ignite.internal.util.typedef.internal.S;
 
@@ -111,6 +112,31 @@ public class CacheKeyConfiguration implements Serializable 
{
 }
 
 /** {@inheritDoc} */
+@Override public boolean equals(Object o) {
+if (this == o)
+return true;
+
+if (o == null || getClass() != o.getClass())
+return false;
+
+CacheKeyConfiguration that = (CacheKeyConfiguration)o;
+
+if (!Objects.equals(typeName, that.typeName))
+return false;
+
+return Objects.equals(affKeyFieldName, that.affKeyFieldName);
+}
+
+/** {@inheritDoc} */
+@Override public int hashCode() {
+int result = typeName != null ? typeName.hashCode() : 0;
+
+result = 31 * result + (affKeyFieldName != null ? 
affKeyFieldName.hashCode() : 0);
+
+return result;
+}
+
+/** {@inheritDoc} */
 @Override public String toString() {
 return S.toString(CacheKeyConfiguration.class, this);
 }
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
index 72ac6be..3df638d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
@@ -381,6 +381,9 @@ class ClusterCachesInfo {
 "Affinity partitions count", locAttr.affinityPartitionsCount(),
 rmtAttr.affinityPartitionsCount(), true);
 
+CU.validateKeyConfigiration(rmtAttr.groupName(), 
rmtAttr.cacheName(), rmt, rmtAttr.configuration().getKeyConfiguration(),
+locAttr.configuration().getKeyConfiguration(), log, true);
+
 CU.checkAttributeMismatch(log, rmtAttr.cacheName(), rmt, 
"evictionFilter", "Eviction filter",
 locAttr.evictionFilterClassName(), 
rmtAttr.evictionFilterClassName(), true);
 
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index cc5dd42..f6ea2ba 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -47,6 +47,7 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.IgniteSystemProperties;
+import org.apache.ignite.cache.CacheKeyConfiguration;
 import org.apache.ignite.cache.CachePartialUpdateException;
 import org.apache.ignite.cache.CacheServerNotFoundException;
 import org.apache.ignite.cache.QueryEntity;
@@ -984,25 +985,13 @@ public class GridCacheUtils {
 assert attrName != null;
 assert attrMsg != null;
 
-if (!F.eq(locVal, rmtVal)) {
-if (fail) {
-throw new IgniteCheckedException(attrMsg + " mismatch (fix " + 
attrMsg.toLowerCase() + " in cache " +
-"configuration or set -D" + 
IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK + "=true " +
-"system property) [cacheName=" + cfgName +
-", local" + capitalize(attrName) + "=" + locVal +
-", 

[ignite] 01/01: Merge remote-tracking branch 'remotes/origin/master' into ignite-11704

2019-07-30 Thread sboikov
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 546299e0c94a2cbc52073b3a531c1cf665237f4b
Merge: 901661a abc808a
Author: sboikov 
AuthorDate: Tue Jul 30 14:13:59 2019 +0300

Merge remote-tracking branch 'remotes/origin/master' into ignite-11704

 .../GridCacheDatabaseSharedManager.java|  3 +
 .../cache/persistence/pagemem/PageMemoryImpl.java  | 21 +--
 .../persistence/pagemem/PagesWriteThrottle.java| 26 ++--
 .../pagemem/PagesWriteThrottlePolicy.java  | 10 +++-
 .../cluster/GridClusterStateProcessor.java | 10 +---
 ...rocessorCheckGlobalStateComputeRequestTest.java | 69 ++
 .../pagemem/IgniteThrottlingUnitTest.java  | 61 +++
 .../ignite/testsuites/IgniteBasicTestSuite.java|  2 +
 .../apache/ignite/util/GridCommandHandlerTest.java |  2 +
 9 files changed, 184 insertions(+), 20 deletions(-)



[ignite] branch ignite-11704 updated (901661a -> 546299e)

2019-07-30 Thread sboikov
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 901661a  ignite-11704
 add aa93762  IGNITE-6796 Use CheckGlobalStateComputeRequest in place of 
GridClusterStateProcessor$5.
 add abc808a  IGNITE-12006 Fixed threads may be parked for indefinite time 
during throttling after spurious wakeups - Fixes #6712.
 new 546299e  Merge remote-tracking branch 'remotes/origin/master' into 
ignite-11704

The 1 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:
 .../GridCacheDatabaseSharedManager.java|  3 +
 .../cache/persistence/pagemem/PageMemoryImpl.java  | 21 +--
 .../persistence/pagemem/PagesWriteThrottle.java| 26 ++--
 .../pagemem/PagesWriteThrottlePolicy.java  | 10 +++-
 .../cluster/GridClusterStateProcessor.java | 10 +---
 ...rocessorCheckGlobalStateComputeRequestTest.java | 69 ++
 .../pagemem/IgniteThrottlingUnitTest.java  | 61 +++
 .../ignite/testsuites/IgniteBasicTestSuite.java|  2 +
 .../apache/ignite/util/GridCommandHandlerTest.java |  2 +
 9 files changed, 184 insertions(+), 20 deletions(-)
 create mode 100644 
modules/core/src/test/java/org/apache/ignite/internal/ClusterProcessorCheckGlobalStateComputeRequestTest.java



[ignite] branch master updated: IGNITE-12006 Fixed threads may be parked for indefinite time during throttling after spurious wakeups - Fixes #6712.

2019-07-30 Thread dgovorukhin
This is an automated email from the ASF dual-hosted git repository.

dgovorukhin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new abc808a  IGNITE-12006 Fixed threads may be parked for indefinite time 
during throttling after spurious wakeups - Fixes #6712.
abc808a is described below

commit abc808afe166ffd0698992fdc9bbee4f888cba76
Author: Sergey Antonov 
AuthorDate: Tue Jul 30 12:05:05 2019 +0300

IGNITE-12006 Fixed threads may be parked for indefinite time during 
throttling after spurious wakeups - Fixes #6712.
---
 .../GridCacheDatabaseSharedManager.java|  3 ++
 .../cache/persistence/pagemem/PageMemoryImpl.java  | 21 ++--
 .../persistence/pagemem/PagesWriteThrottle.java| 26 +++--
 .../pagemem/PagesWriteThrottlePolicy.java  | 10 +++-
 .../pagemem/IgniteThrottlingUnitTest.java  | 61 ++
 .../apache/ignite/util/GridCommandHandlerTest.java |  2 +
 6 files changed, 111 insertions(+), 12 deletions(-)

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 b1a21de..c11b67c 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
@@ -4731,6 +4731,9 @@ public class GridCacheDatabaseSharedManager extends 
IgniteCacheDatabaseSharedMan
 if (pagesToRetry.isEmpty())
 doneFut.onDone((Void)null);
 else {
+LT.warn(log, pagesToRetry.size() + " checkpoint pages were 
not written yet due to unsuccessful " +
+"page write lock acquisition and will be retried");
+
 if (retryWriteExecutor == null) {
 while (!pagesToRetry.isEmpty())
 pagesToRetry = writePages(pagesToRetry);
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
index 7877eec..8a543c6 100755
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
@@ -926,7 +926,7 @@ public class PageMemoryImpl implements PageMemoryEx {
 // We pinned the page when allocated the temp buffer, release it 
now.
 PageHeader.releasePage(absPtr);
 
-checkpointPool.releaseFreePage(tmpBufPtr);
+releaseCheckpointBufferPage(tmpBufPtr);
 }
 
 if (rmv)
@@ -945,6 +945,14 @@ public class PageMemoryImpl implements PageMemoryEx {
 return relPtr;
 }
 
+/** */
+private void releaseCheckpointBufferPage(long tmpBufPtr) {
+int resCntr = checkpointPool.releaseFreePage(tmpBufPtr);
+
+if (resCntr == checkpointBufferPagesSize() / 2 && writeThrottle != 
null)
+writeThrottle.tryWakeupThrottledThreads();
+}
+
 /**
  * Restores page from WAL page snapshot & delta records.
  *
@@ -1298,7 +1306,7 @@ public class PageMemoryImpl implements PageMemoryEx {
 if (tracker != null)
 tracker.onCowPageWritten();
 
-checkpointPool.releaseFreePage(tmpRelPtr);
+releaseCheckpointBufferPage(tmpRelPtr);
 
 // Need release again because we pin page when resolve abs 
pointer,
 // and page did not have tmp buffer page.
@@ -1934,14 +1942,17 @@ public class PageMemoryImpl implements PageMemoryEx {
 
 /**
  * @param relPtr Relative pointer to free.
+ * @return Resulting number of pages in pool if pages counter is 
enabled, 0 otherwise.
  */
-private void releaseFreePage(long relPtr) {
+private int releaseFreePage(long relPtr) {
 long absPtr = absolute(relPtr);
 
 assert !PageHeader.isAcquired(absPtr) : "Release pinned page: " + 
PageHeader.fullPageId(absPtr);
 
+int resCntr = 0;
+
 if (pagesCntr != null)
-pagesCntr.getAndDecrement();
+resCntr = pagesCntr.decrementAndGet();
 
 while (true) {
 long freePageRelPtrMasked = 
GridUnsafe.getLong(freePageListPtr);
@@ -1951,7 +1962,7 @@ public class PageMemoryImpl implements PageMemoryEx {
 GridUnsafe.putLong(absPtr, freePageRelPtr);
 
 if 

[ignite] branch ignite-11704 updated: ignite-11704

2019-07-30 Thread sboikov
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


The following commit(s) were added to refs/heads/ignite-11704 by this push:
 new 901661a  ignite-11704
901661a is described below

commit 901661ad40815aaeaf25470c67e575fade0c9ade
Author: sboikov 
AuthorDate: Tue Jul 30 10:57:47 2019 +0300

ignite-11704
---
 .../internal/processors/cache/IgniteCacheOffheapManager.java  | 11 ++-
 .../processors/cache/IgniteCacheOffheapManagerImpl.java   | 10 +-
 .../processors/cache/persistence/GridCacheOffheapManager.java |  8 
 3 files changed, 15 insertions(+), 14 deletions(-)

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 aca75b6..8b6b623 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
@@ -28,6 +28,7 @@ import 
org.apache.ignite.internal.processors.cache.distributed.dht.topology.Grid
 import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
 import org.apache.ignite.internal.processors.cache.mvcc.MvccVersion;
 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.persistence.CacheSearchRow;
 import org.apache.ignite.internal.processors.cache.persistence.RootPage;
 import org.apache.ignite.internal.processors.cache.persistence.RowStore;
@@ -215,7 +216,7 @@ public interface IgniteCacheOffheapManager {
  * @return Iterator over all versions.
  * @throws IgniteCheckedException If failed.
  */
-GridCursor mvccAllVersionsCursor(GridCacheContext cctx, 
KeyCacheObject key, Object x)
+GridCursor mvccAllVersionsCursor(GridCacheContext cctx, 
KeyCacheObject key, CacheDataRowAdapter.RowData x)
 throws IgniteCheckedException;
 
 /**
@@ -945,7 +946,7 @@ public interface IgniteCacheOffheapManager {
  * @return Iterator over all versions.
  * @throws IgniteCheckedException If failed.
  */
-GridCursor mvccAllVersionsCursor(GridCacheContext cctx, 
KeyCacheObject key, Object x)
+GridCursor mvccAllVersionsCursor(GridCacheContext cctx, 
KeyCacheObject key, CacheDataRowAdapter.RowData x)
 throws IgniteCheckedException;
 
 /**
@@ -980,7 +981,7 @@ public interface IgniteCacheOffheapManager {
  * @return Data cursor.
  * @throws IgniteCheckedException If failed.
  */
-public GridCursor cursor(Object x) throws 
IgniteCheckedException;
+public GridCursor 
cursor(CacheDataRowAdapter.RowData x) throws IgniteCheckedException;
 
 /**
  * @param mvccSnapshot MVCC snapshot.
@@ -1025,7 +1026,7 @@ public interface IgniteCacheOffheapManager {
  * @throws IgniteCheckedException If failed.
  */
 public GridCursor cursor(int cacheId, 
KeyCacheObject lower,
-KeyCacheObject upper, Object x) throws IgniteCheckedException;
+KeyCacheObject upper, CacheDataRowAdapter.RowData x) throws 
IgniteCheckedException;
 
 /**
  * @param cacheId Cache ID.
@@ -1040,7 +1041,7 @@ public interface IgniteCacheOffheapManager {
 public GridCursor cursor(int cacheId,
 KeyCacheObject lower,
 KeyCacheObject upper,
-Object x,
+CacheDataRowAdapter.RowData x,
 MvccSnapshot snapshot,
 boolean withTombstones) throws IgniteCheckedException;
 
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 8aa5514..1f3a22d 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
@@ -687,7 +687,7 @@ public class IgniteCacheOffheapManagerImpl implements 
IgniteCacheOffheapManager
 
 /** {@inheritDoc} */
 @Override public GridCursor 
mvccAllVersionsCursor(GridCacheContext cctx,
-KeyCacheObject key, Object x) throws IgniteCheckedException {
+KeyCacheObject key, CacheDataRowAdapter.RowData x) throws 
IgniteCheckedException {
 CacheDataStore dataStore = dataStore(cctx, key);
 
 return dataStore != null ? dataStore.mvccAllVersionsCursor(cctx, key, 
x) : EMPTY_CURSOR;
@@ -2889,7 +2889,7 @@ public class IgniteCacheOffheapManagerImpl implements 

[ignite] branch ignite-11704 updated: ignite-11704

2019-07-30 Thread sboikov
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


The following commit(s) were added to refs/heads/ignite-11704 by this push:
 new 7d3fcdc  ignite-11704
7d3fcdc is described below

commit 7d3fcdc3b6b3235f69c39074afa3189776865402
Author: sboikov 
AuthorDate: Tue Jul 30 10:54:01 2019 +0300

ignite-11704
---
 .../ignite/internal/processors/query/h2/database/H2PkHashIndex.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2PkHashIndex.java
 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2PkHashIndex.java
index d3bff29..db85a7b 100644
--- 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2PkHashIndex.java
+++ 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2PkHashIndex.java
@@ -209,7 +209,7 @@ public class H2PkHashIndex extends GridH2IndexBase {
 int part = store.partId();
 
 if (partsFilter == null || partsFilter.applyPartition(part))
-cursors.add(store.cursor(cctx.cacheId()));
+cursors.add(store.cursor(cctx.cacheId(), false));
 }
 
 Cursor pkHashCursor = new H2PkHashIndexCursor(cursors.iterator());



[ignite] branch ignite-11704 updated: ignite-11704

2019-07-30 Thread sboikov
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


The following commit(s) were added to refs/heads/ignite-11704 by this push:
 new ea425b4  ignite-11704
ea425b4 is described below

commit ea425b4306702abf27dd84e1370a4bc273df874a
Author: sboikov 
AuthorDate: Tue Jul 30 09:43:39 2019 +0300

ignite-11704
---
 .../internal/processors/cache/GridCacheAbstractFullApiSelfTest.java  | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index 7a823d4..ef7463e 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -6728,7 +6728,10 @@ public abstract class GridCacheAbstractFullApiSelfTest 
extends GridCacheAbstract
 
 GridCacheContext ctx = 
((IgniteKernal)ignite).internalCache(DEFAULT_CACHE_NAME).context();
 
-GridCacheEntryEx entry = ctx.isNear() ? 
ctx.near().dht().peekEx(key) : ctx.cache().peekEx(key);
+if (ctx.isNear())
+ctx = ctx.near().dht().context();
+
+GridCacheEntryEx entry = ctx.cache().peekEx(key);
 
 if (ctx.deferredDelete() && 
ignite.affinity(DEFAULT_CACHE_NAME).mapKeyToPrimaryAndBackups(key).contains(((IgniteKernal)ignite).localNode()))
 {
 assertNotNull(entry);