You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/06/30 18:29:21 UTC
[7/7] ignite git commit: Merge remote-tracking branch
'remotes/community/ignite-2.1.2' into ignite-gg-12389
Merge remote-tracking branch 'remotes/community/ignite-2.1.2' into ignite-gg-12389
# Conflicts:
# modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c22a7f54
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c22a7f54
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c22a7f54
Branch: refs/heads/ignite-gg-12389
Commit: c22a7f547b5097333c56df7096b75e327fdb9b67
Parents: 3443d88 18bbb14
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jun 30 21:28:35 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jun 30 21:28:35 2017 +0300
----------------------------------------------------------------------
.../cache/CacheAffinitySharedManager.java | 26 +-
.../processors/cache/ClusterCachesInfo.java | 13 +-
.../cache/DynamicCacheChangeRequest.java | 1 +
.../processors/cache/ExchangeActions.java | 109 ++++-
.../processors/cache/GridCacheProcessor.java | 58 ++-
.../distributed/near/GridNearCacheAdapter.java | 4 +-
.../near/GridCacheNearEvictionSelfTest.java | 5 +-
.../near/GridCacheNearMetricsSelfTest.java | 29 +-
modules/web-console/frontend/.eslintrc | 2 +-
modules/web-console/frontend/app/app.js | 4 +
.../app/components/bs-select-menu/style.scss | 1 +
.../grid-column-selector/component.js | 29 ++
.../grid-column-selector/controller.js | 111 +++++
.../grid-column-selector/controller.spec.js | 435 +++++++++++++++++++
.../components/grid-column-selector/index.js | 24 +
.../components/grid-column-selector/style.scss | 24 +
.../grid-column-selector/template.pug | 28 ++
.../list-of-registered-users.categories.js | 22 +-
.../list-of-registered-users.column-defs.js | 4 +-
.../list-of-registered-users.controller.js | 46 --
.../list-of-registered-users.scss | 3 +
.../list-of-registered-users.tpl.pug | 26 +-
.../components/pcbProtectFromBsSelectRender.js | 32 --
.../components/page-configure-basic/index.js | 2 -
.../page-configure-basic/template.pug | 4 +-
.../protect-from-bs-select-render/directive.js | 32 ++
.../protect-from-bs-select-render/index.js | 24 +
.../frontend/app/helpers/jade/mixins.pug | 1 -
.../frontend/app/modules/sql/sql.controller.js | 21 +-
.../frontend/app/primitives/btn/index.scss | 8 +-
.../frontend/app/primitives/dropdown/index.pug | 2 +-
.../app/primitives/ui-grid-settings/index.pug | 33 --
.../frontend/public/stylesheets/style.scss | 17 +
.../web-console/frontend/views/sql/sql.tpl.pug | 6 +-
34 files changed, 942 insertions(+), 244 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/c22a7f54/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/c22a7f54/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/c22a7f54/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/c22a7f54/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeActions.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeActions.java
index a2fe129,9caf9aa..04b15ee
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeActions.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeActions.java
@@@ -50,9 -50,32 +50,32 @@@ public class ExchangeActions
private Map<String, ActionData> cachesToResetLostParts;
/** */
- private ClusterState newState;
+ private StateChangeRequest stateChangeReq;
/**
+ * @param grpId Group ID.
+ * @return Always {@code true}, fails with assert error if inconsistent.
+ */
+ boolean checkStopRequestConsistency(int grpId) {
+ Boolean destroy = null;
+
+ // Check that caches associated with that group will be all stopped only or all destroyed.
+ for (ExchangeActions.ActionData action : cacheStopRequests()) {
+ if (action.descriptor().groupId() == grpId) {
+ if (destroy == null)
+ destroy = action.request().destroy();
+ else {
+ assert action.request().destroy() == destroy
+ : "Both cache stop only and cache destroy request associated with one group in batch "
+ + cacheStopRequests();
+ }
+ }
+ }
+
+ return true;
+ }
+
+ /**
* @return {@code True} if server nodes should not participate in exchange.
*/
public boolean clientOnlyExchange() {
http://git-wip-us.apache.org/repos/asf/ignite/blob/c22a7f54/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 8fc55bd,bb6d068..1bf30cd
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@@ -2087,36 -2114,33 +2087,30 @@@ public class GridCacheProcessor extend
) {
initCacheProxies(topVer, err);
- if (exchActions != null && exchActions.systemCachesStarting() && exchActions.stateChangeRequest() == null)
- ctx.dataStructures().restoreStructuresState(ctx);
-
- if (exchActions != null && err == null) {
- Collection<IgniteBiTuple<CacheGroupContext, Boolean>> stoppedGrps = null;
-
- boolean forceCheckpoint = false;
-
- for (ExchangeActions.ActionData action : exchActions.cacheStopRequests()) {
- GridCacheContext<?, ?> stopCtx;
- boolean destroy;
+ if (exchActions == null)
+ return;
- if (!forceCheckpoint){
- try {
- sharedCtx.database().waitForCheckpoint("caches stop");
- }
- catch (IgniteCheckedException e) {
- U.error(log, "Failed to wait for checkpoint finish during cache stop.", e);
- }
- if (exchActions.systemCachesStarting() && exchActions.newClusterState() == null)
++ if (exchActions.systemCachesStarting() && exchActions.stateChangeRequest() == null)
+ ctx.dataStructures().restoreStructuresState(ctx);
- forceCheckpoint = true;
+ if (err == null) {
+ // Force checkpoint if there is any cache stop request
+ if (exchActions.cacheStopRequests().size() > 0) {
+ try {
+ sharedCtx.database().waitForCheckpoint("caches stop");
+ }
+ catch (IgniteCheckedException e) {
+ U.error(log, "Failed to wait for checkpoint finish during cache stop.", e);
}
+ }
+ for (ExchangeActions.ActionData action : exchActions.cacheStopRequests()) {
stopGateway(action.request());
sharedCtx.database().checkpointReadLock();
try {
- stopCtx = prepareCacheStop(action.request().cacheName(), action.request().destroy());
- destroy = action.request().destroy();
+ prepareCacheStop(action.request().cacheName(), action.request().destroy());
-
- if (exchActions.newClusterState() == null)
- ctx.state().onCacheStop(action.request());
}
finally {
sharedCtx.database().checkpointReadUnlock();