ignite git commit: IGNITE-336 Visor CMD: Added commands to enable/disable cache statistics in runtime.
Repository: ignite Updated Branches: refs/heads/master d196ce355 -> bf2f05e32 IGNITE-336 Visor CMD: Added commands to enable/disable cache statistics in runtime. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/bf2f05e3 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/bf2f05e3 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/bf2f05e3 Branch: refs/heads/master Commit: bf2f05e323d7eb6fbc0a1c5b9111ed8c05be503d Parents: d196ce3 Author: Vasiliy Sisko Authored: Thu Nov 15 14:12:36 2018 +0700 Committer: Alexey Kuznetsov Committed: Thu Nov 15 14:12:36 2018 +0700 -- .../ignite/internal/visor/cache/VisorCache.java | 20 ++- .../cache/VisorCacheToggleStatisticsTask.java | 72 + .../VisorCacheToggleStatisticsTaskArg.java | 87 +++ .../commands/cache/VisorCacheCommand.scala | 76 ++ .../VisorCacheToggleStatisticsCommand.scala | 152 +++ .../app/modules/cluster/CacheMetrics.js | 3 + 6 files changed, 380 insertions(+), 30 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/bf2f05e3/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java index 63eb13c..495a9cb 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java @@ -91,6 +91,9 @@ public class VisorCache extends VisorDataTransferObject { /** Cache system state. */ private boolean sys; +/** Checks whether statistics collection is enabled in this cache. */ +private boolean statisticsEnabled; + /** * Create data transfer object for given cache. */ @@ -119,7 +122,7 @@ public class VisorCache extends VisorDataTransferObject { backupSize = ca.localSizeLong(PEEK_ONHEAP_BACKUP); nearSize = ca.nearSize(); size = primarySize + backupSize + nearSize; - + partitions = ca.affinity().partitions(); near = cctx.isNear(); @@ -127,6 +130,8 @@ public class VisorCache extends VisorDataTransferObject { metrics = new VisorCacheMetrics(ignite, name); sys = ignite.context().cache().systemCache(name); + +statisticsEnabled = ca.clusterMetrics().isStatisticsEnabled(); } /** @@ -278,9 +283,16 @@ public class VisorCache extends VisorDataTransferObject { return metrics != null ? metrics.getOffHeapEntriesCount() : 0L; } +/** + * @return Checks whether statistics collection is enabled in this cache. + */ +public boolean isStatisticsEnabled() { +return statisticsEnabled; +} + /** {@inheritDoc} */ @Override public byte getProtocolVersion() { -return V2; +return V3; } /** {@inheritDoc} */ @@ -298,6 +310,7 @@ public class VisorCache extends VisorDataTransferObject { out.writeBoolean(near); out.writeObject(metrics); out.writeBoolean(sys); +out.writeBoolean(statisticsEnabled); } /** {@inheritDoc} */ @@ -316,6 +329,9 @@ public class VisorCache extends VisorDataTransferObject { metrics = (VisorCacheMetrics)in.readObject(); sys = protoVer > V1 ? in.readBoolean() : metrics != null && metrics.isSystem(); + +if (protoVer > V2) +statisticsEnabled = in.readBoolean(); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/bf2f05e3/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheToggleStatisticsTask.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheToggleStatisticsTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheToggleStatisticsTask.java new file mode 100644 index 000..aebed81 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheToggleStatisticsTask.java @@ -0,0 +1,72 @@ +/* + * 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 + * + *
ignite git commit: IGNITE-7861 Web Console: Fixed "Activities" dialog UI and saving activities on state changing.
Repository: ignite Updated Branches: refs/heads/master 5a240e705 -> d196ce355 IGNITE-7861 Web Console: Fixed "Activities" dialog UI and saving activities on state changing. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d196ce35 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d196ce35 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d196ce35 Branch: refs/heads/master Commit: d196ce35590e7452015b4beea4697e650264e844 Parents: 5a240e7 Author: Vasiliy Sisko Authored: Thu Nov 15 11:06:17 2018 +0700 Committer: Alexey Kuznetsov Committed: Thu Nov 15 11:06:17 2018 +0700 -- .../activities-user-dialog.controller.js| 6 ++--- .../activities-user-dialog.tpl.pug | 2 +- .../frontend/app/components/page-admin/index.js | 16 - .../app/components/page-configure/index.js | 11 + .../components/queries-notebook/controller.js | 10 .../app/components/page-queries/index.js| 17 +++-- modules/web-console/frontend/app/data/i18n.js | 25 +--- .../frontend/app/modules/user/user.module.js| 8 --- .../frontend/views/includes/header-left.pug | 2 +- 9 files changed, 62 insertions(+), 35 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/d196ce35/modules/web-console/frontend/app/components/activities-user-dialog/activities-user-dialog.controller.js -- diff --git a/modules/web-console/frontend/app/components/activities-user-dialog/activities-user-dialog.controller.js b/modules/web-console/frontend/app/components/activities-user-dialog/activities-user-dialog.controller.js index fb9d15a..bd3bb07 100644 --- a/modules/web-console/frontend/app/components/activities-user-dialog/activities-user-dialog.controller.js +++ b/modules/web-console/frontend/app/components/activities-user-dialog/activities-user-dialog.controller.js @@ -25,9 +25,9 @@ export default class ActivitiesCtrl { $ctrl.data = _.map(user.activitiesDetail, (amount, action) => ({action, amount})); $ctrl.columnDefs = [ -{ displayName: 'Description', field: 'action', enableFiltering: false, cellFilter: 'translate'}, -{ displayName: 'Action', field: 'action', enableFiltering: false}, -{ displayName: 'Visited', field: 'amount', enableFiltering: false} +{ displayName: 'Description', field: 'action', enableFiltering: false, cellFilter: 'translate', minWidth: 120, width: '43%'}, +{ displayName: 'Action', field: 'action', enableFiltering: false, minWidth: 120, width: '43%'}, +{ displayName: 'Visited', field: 'amount', enableFiltering: false, minWidth: 80} ]; } } http://git-wip-us.apache.org/repos/asf/ignite/blob/d196ce35/modules/web-console/frontend/app/components/activities-user-dialog/activities-user-dialog.tpl.pug -- diff --git a/modules/web-console/frontend/app/components/activities-user-dialog/activities-user-dialog.tpl.pug b/modules/web-console/frontend/app/components/activities-user-dialog/activities-user-dialog.tpl.pug index 7e9d3f5..511a37b 100644 --- a/modules/web-console/frontend/app/components/activities-user-dialog/activities-user-dialog.tpl.pug +++ b/modules/web-console/frontend/app/components/activities-user-dialog/activities-user-dialog.tpl.pug @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. -.modal.modal--ignite.theme--ignite(tabindex='-1' role='dialog') +.modal.modal--ignite.modal--wide.theme--ignite(tabindex='-1' role='dialog') .modal-dialog .modal-content .modal-header http://git-wip-us.apache.org/repos/asf/ignite/blob/d196ce35/modules/web-console/frontend/app/components/page-admin/index.js -- diff --git a/modules/web-console/frontend/app/components/page-admin/index.js b/modules/web-console/frontend/app/components/page-admin/index.js index 8b26f2c..69816f6 100644 --- a/modules/web-console/frontend/app/components/page-admin/index.js +++ b/modules/web-console/frontend/app/components/page-admin/index.js @@ -19,10 +19,24 @@ import './style.scss'; import controller from './controller'; import templateUrl from './template.tpl.pug'; +import {default as ActivitiesData} from 'app/core/activities/Activities.data'; + +/** + * @param {uirouter.UIRouter} $uiRouter + * @param {ActivitiesData} ActivitiesData + */ +function registerActivitiesHook($uiRouter, ActivitiesData) { +$uiRouter.transitionService.onSuccess({to: 'base.settings.**'}, (transition) => { +
ignite git commit: IGNITE-9511 Web Console: Fixed issues with modals that contains Ace editor.
Repository: ignite Updated Branches: refs/heads/master efd2c9c72 -> 5a240e705 IGNITE-9511 Web Console: Fixed issues with modals that contains Ace editor. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5a240e70 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5a240e70 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5a240e70 Branch: refs/heads/master Commit: 5a240e705cc16b508321ca2c5a06c143e8c0b5b2 Parents: efd2c9c Author: Alexander Kalinin Authored: Thu Nov 15 10:38:25 2018 +0700 Committer: Alexey Kuznetsov Committed: Thu Nov 15 10:38:25 2018 +0700 -- .../frontend/app/primitives/modal/index.scss| 26 ++-- modules/web-console/frontend/package.json | 2 +- 2 files changed, 25 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/5a240e70/modules/web-console/frontend/app/primitives/modal/index.scss -- diff --git a/modules/web-console/frontend/app/primitives/modal/index.scss b/modules/web-console/frontend/app/primitives/modal/index.scss index 2be2ecd..eb621e5 100644 --- a/modules/web-console/frontend/app/primitives/modal/index.scss +++ b/modules/web-console/frontend/app/primitives/modal/index.scss @@ -54,7 +54,6 @@ .modal .modal-dialog { width: 650px; -transform: translateZ(1px); } .modal .modal-dialog--adjust-height { @@ -247,4 +246,27 @@ .modal--wide .modal-dialog { width: 900px; -} \ No newline at end of file +} + +.modal-with-ace { +.modal-body { +padding-left: 5px !important; +} + +.modal-dialog { +transform: none !important; + +.ace_warning:before, .ace_error:before { +position: absolute !important; +left: -7px !important; +} +} + +.ace_gutter, .ace_layer { +overflow: visible !important; +} + +.ace_gutter { +padding-left: 5px !important; +} +} http://git-wip-us.apache.org/repos/asf/ignite/blob/5a240e70/modules/web-console/frontend/package.json -- diff --git a/modules/web-console/frontend/package.json b/modules/web-console/frontend/package.json index 2260f75..9059a5f 100644 --- a/modules/web-console/frontend/package.json +++ b/modules/web-console/frontend/package.json @@ -52,7 +52,7 @@ "angular-ui-grid": "4.6.1", "angular-ui-validate": "1.2.3", "angular1-async-filter": "1.1.0", -"brace": "0.10.0", +"brace": "0.11.1", "browser-update": "3.1.13", "bson-objectid": "1.1.5", "chart.js": "2.7.2",
ignite git commit: IGNITE-6600 Web Console: Refactored 404 & 403 pages to timed redirection component.
Repository: ignite Updated Branches: refs/heads/master 2d86d7083 -> efd2c9c72 IGNITE-6600 Web Console: Refactored 404 & 403 pages to timed redirection component. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/efd2c9c7 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/efd2c9c7 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/efd2c9c7 Branch: refs/heads/master Commit: efd2c9c72f3a98ac7f7401bde091c0b645c8d133 Parents: 2d86d70 Author: Alexander Kalinin Authored: Thu Nov 15 10:02:40 2018 +0700 Committer: Alexey Kuznetsov Committed: Thu Nov 15 10:02:40 2018 +0700 -- modules/web-console/frontend/app/app.js | 4 +- .../components/timed-redirection/component.ts | 29 ++ .../components/timed-redirection/controller.ts | 60 .../app/components/timed-redirection/index.ts | 23 .../app/components/timed-redirection/style.scss | 47 +++ .../components/timed-redirection/template.pug | 22 +++ .../frontend/app/modules/states/errors.state.js | 18 -- modules/web-console/frontend/views/403.tpl.pug | 24 modules/web-console/frontend/views/404.tpl.pug | 24 9 files changed, 196 insertions(+), 55 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/efd2c9c7/modules/web-console/frontend/app/app.js -- diff --git a/modules/web-console/frontend/app/app.js b/modules/web-console/frontend/app/app.js index 47374aa..2dd2733 100644 --- a/modules/web-console/frontend/app/app.js +++ b/modules/web-console/frontend/app/app.js @@ -150,6 +150,7 @@ import formField from './components/form-field'; import igniteChart from './components/ignite-chart'; import igniteChartSelector from './components/ignite-chart-series-selector'; import statusOutput from './components/status-output'; +import timedRedirection from './components/timed-redirection'; import pageProfile from './components/page-profile'; import pagePasswordChanged from './components/page-password-changed'; @@ -264,7 +265,8 @@ export default angular.module('ignite-console', [ statusOutput.name, progressLine.name, formField.name, -formSignup.name +formSignup.name, +timedRedirection.name ]) .service('$exceptionHandler', $exceptionHandler) // Directives. http://git-wip-us.apache.org/repos/asf/ignite/blob/efd2c9c7/modules/web-console/frontend/app/components/timed-redirection/component.ts -- diff --git a/modules/web-console/frontend/app/components/timed-redirection/component.ts b/modules/web-console/frontend/app/components/timed-redirection/component.ts new file mode 100644 index 000..5cab0c9 --- /dev/null +++ b/modules/web-console/frontend/app/components/timed-redirection/component.ts @@ -0,0 +1,29 @@ +/* + * 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. + */ + +import template from './template.pug'; +import './style.scss'; +import {TimedRedirectionCtrl} from './controller'; + +export const component: ng.IComponentOptions = { +template, +controller: TimedRedirectionCtrl, +bindings: { +headerText: '<', +subHeaderText: '<' +} +}; http://git-wip-us.apache.org/repos/asf/ignite/blob/efd2c9c7/modules/web-console/frontend/app/components/timed-redirection/controller.ts -- diff --git a/modules/web-console/frontend/app/components/timed-redirection/controller.ts b/modules/web-console/frontend/app/components/timed-redirection/controller.ts new file mode 100644 index 000..034ff3c --- /dev/null +++ b/modules/web-console/frontend/app/components/timed-redirection/controller.ts @@ -0,0 +1,60 @@ +/* + * 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
ignite git commit: Added partition number in ClusterTopologyServerNotFoundException message.
Repository: ignite Updated Branches: refs/heads/master d244225fb -> 2d86d7083 Added partition number in ClusterTopologyServerNotFoundException message. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2d86d708 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2d86d708 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2d86d708 Branch: refs/heads/master Commit: 2d86d7083bf5adc1ac4f155f6378f4d77fd395de Parents: d244225 Author: sboikov Authored: Wed Nov 14 20:15:51 2018 +0300 Committer: sboikov Committed: Wed Nov 14 20:15:51 2018 +0300 -- .../distributed/dht/CacheDistributedGetFutureAdapter.java | 5 +++-- .../cache/distributed/dht/GridPartitionedGetFuture.java | 4 ++-- .../distributed/dht/GridPartitionedSingleGetFuture.java | 9 + .../cache/distributed/near/GridNearGetFuture.java | 4 ++-- 4 files changed, 12 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/2d86d708/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/CacheDistributedGetFutureAdapter.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/CacheDistributedGetFutureAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/CacheDistributedGetFutureAdapter.java index be25859..b1a9be0 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/CacheDistributedGetFutureAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/CacheDistributedGetFutureAdapter.java @@ -157,11 +157,12 @@ public abstract class CacheDistributedGetFutureAdapter extends GridCacheCo } /** + * @param part Partition. * @param topVer Topology version. * @return Exception. */ -protected final ClusterTopologyServerNotFoundException serverNotFoundError(AffinityTopologyVersion topVer) { +protected final ClusterTopologyServerNotFoundException serverNotFoundError(int part, AffinityTopologyVersion topVer) { return new ClusterTopologyServerNotFoundException("Failed to map keys for cache " + -"(all partition nodes left the grid) [topVer=" + topVer + ", cache=" + cctx.name() + ']'); +"(all partition nodes left the grid) [topVer=" + topVer + ", part" + part + ", cache=" + cctx.name() + ']'); } } http://git-wip-us.apache.org/repos/asf/ignite/blob/2d86d708/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java index 387dbfa..f8a4ba4 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java @@ -455,7 +455,7 @@ public class GridPartitionedGetFuture extends CacheDistributedGetFutureAda List affNodes = cctx.affinity().nodesByPartition(part, topVer); if (affNodes.isEmpty()) { -onDone(serverNotFoundError(topVer)); +onDone(serverNotFoundError(part, topVer)); return false; } @@ -477,7 +477,7 @@ public class GridPartitionedGetFuture extends CacheDistributedGetFutureAda ClusterNode node = cctx.selectAffinityNodeBalanced(affNodes, canRemap); if (node == null) { -onDone(serverNotFoundError(topVer)); +onDone(serverNotFoundError(part, topVer)); return false; } http://git-wip-us.apache.org/repos/asf/ignite/blob/2d86d708/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java index 4dc72b2..f28a969 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java +++
ignite git commit: IGNITE-5534 Added cluster activation to benchmarks
Repository: ignite Updated Branches: refs/heads/master d1a039d36 -> d244225fb IGNITE-5534 Added cluster activation to benchmarks Signed-off-by: Andrey Gura Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d244225f Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d244225f Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d244225f Branch: refs/heads/master Commit: d244225fb3497495f246c011cce87ccfc8693f5b Parents: d1a039d Author: oleg-ostanin Authored: Wed Nov 14 19:45:24 2018 +0300 Committer: Andrey Gura Committed: Wed Nov 14 19:45:24 2018 +0300 -- .../yardstick/IgniteAbstractBenchmark.java | 36 .../org/apache/ignite/yardstick/IgniteNode.java | 6 +++- 2 files changed, 41 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/d244225f/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteAbstractBenchmark.java -- diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteAbstractBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteAbstractBenchmark.java index ba8bf50..e5dcd88 100644 --- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteAbstractBenchmark.java +++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteAbstractBenchmark.java @@ -26,6 +26,8 @@ import org.apache.ignite.IgniteCluster; import org.apache.ignite.IgniteLogger; import org.apache.ignite.IgniteState; import org.apache.ignite.Ignition; +import org.apache.ignite.configuration.DataRegionConfiguration; +import org.apache.ignite.configuration.DataStorageConfiguration; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.events.Event; import org.apache.ignite.lang.IgnitePredicate; @@ -68,6 +70,8 @@ public abstract class IgniteAbstractBenchmark extends BenchmarkDriverAdapter { waitForNodes(); +activateCluster(); + IgniteLogger log = ignite().log(); if (log.isInfoEnabled()) @@ -75,6 +79,38 @@ public abstract class IgniteAbstractBenchmark extends BenchmarkDriverAdapter { } /** + * Checks if persistence is enabled and activates cluster. + */ +private void activateCluster() { +//Flag to set if there is at least one data region with persistence in Ignite configuration. +boolean pdsInCfg = false; + +DataStorageConfiguration dsCfg = ignite().configuration().getDataStorageConfiguration(); + +if (dsCfg != null) { +pdsInCfg = dsCfg.getDefaultDataRegionConfiguration().isPersistenceEnabled(); + +DataRegionConfiguration[] drCfgArr = dsCfg.getDataRegionConfigurations(); + +if (drCfgArr != null) { +for (DataRegionConfiguration drCfg : drCfgArr) { +if (drCfg.isPersistenceEnabled()) { +pdsInCfg = true; + +break; +} +} +} +} + +if ((args.persistentStoreEnabled() || pdsInCfg) && !ignite().cluster().active()) { +BenchmarkUtils.println("Activating cluster."); + +ignite().cluster().active(true); +} +} + +/** * Prints non-system caches sizes during preload. * * @param logInterval time interval between printing preload log. Required to be positive. http://git-wip-us.apache.org/repos/asf/ignite/blob/d244225f/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java -- diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java index 0c61435..4698e86 100644 --- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java +++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java @@ -177,9 +177,13 @@ public class IgniteNode implements BenchmarkServer { memCfg.setPageSize(args.getPageSize()); } -if (args.persistentStoreEnabled()) { +// Set data storage configuration with persistence only if there is no data storage configuration +// in configuration file. +if (args.persistentStoreEnabled() && c.getDataStorageConfiguration() == null) { DataStorageConfiguration pcCfg = new DataStorageConfiguration(); + pcCfg.getDefaultDataRegionConfiguration().setPersistenceEnabled(true); + c.setBinaryConfiguration(new BinaryConfiguration().setCompactFooter(false)); c.setDataStorageConfiguration(pcCfg);
ignite git commit: IGNITE-10228 Fixed concurrent start caches race leading to a missed cache context - Fixes #5377.
Repository: ignite Updated Branches: refs/heads/master 59a7986be -> d1a039d36 IGNITE-10228 Fixed concurrent start caches race leading to a missed cache context - Fixes #5377. Signed-off-by: Alexey Goncharuk Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d1a039d3 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d1a039d3 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d1a039d3 Branch: refs/heads/master Commit: d1a039d36787d1920b631d71e8228fa5c47e5d20 Parents: 59a7986 Author: Pavel Voronkin Authored: Wed Nov 14 15:40:57 2018 +0300 Committer: Alexey Goncharuk Committed: Wed Nov 14 16:53:07 2018 +0300 -- .../processors/cache/CacheGroupContext.java | 99 - .../ignite/internal/util/IgniteUtils.java | 39 ++-- .../distributed/CacheParallelStartTest.java | 202 +++ .../internal/util/IgniteUtilsSelfTest.java | 61 +++--- .../testsuites/IgniteCacheTestSuite6.java | 3 + 5 files changed, 305 insertions(+), 99 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/d1a039d3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java -- 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 b0d6c07..93ba69c 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 @@ -20,7 +20,7 @@ package org.apache.ignite.internal.processors.cache; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; -import java.util.Iterator; +import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Set; @@ -115,10 +115,9 @@ public class CacheGroupContext { /** */ private final boolean storeCacheId; -/** */ -private volatile List caches; +/** We modify content under lock, by making defencive copy, field always contains unmodifiable list. */ +private volatile List caches = Collections.unmodifiableList(new ArrayList<>()); -/** */ private volatile List contQryCaches; /** */ @@ -152,16 +151,16 @@ public class CacheGroupContext { private final ReuseList reuseList; /** */ -private boolean drEnabled; +private volatile boolean drEnabled; /** */ -private boolean qryEnabled; +private volatile boolean qryEnabled; /** */ -private boolean mvccEnabled; +private final boolean mvccEnabled; /** MXBean. */ -private CacheGroupMetricsMXBean mxBean; +private final CacheGroupMetricsMXBean mxBean; /** */ private volatile boolean localWalEnabled; @@ -236,8 +235,6 @@ public class CacheGroupContext { log = ctx.kernalContext().log(getClass()); -caches = new ArrayList<>(); - mxBean = new CacheGroupMetricsMXBeanImpl(this); } @@ -307,10 +304,9 @@ public class CacheGroupContext { public boolean hasCache(String cacheName) { List caches = this.caches; -for (int i = 0; i < caches.size(); i++) { -if (caches.get(i).name().equals(cacheName)) +for (GridCacheContext cacheContext : caches) +if (cacheContext.name().equals(cacheName)) return true; -} return false; } @@ -322,11 +318,17 @@ public class CacheGroupContext { assert cacheType.userCache() == cctx.userCache() : cctx.name(); assert grpId == cctx.groupId() : cctx.name(); -ArrayList caches = new ArrayList<>(this.caches); +final boolean add; -assert sharedGroup() || caches.isEmpty(); +synchronized (this) { +List copy = new ArrayList<>(caches); + +assert sharedGroup() || copy.isEmpty(); -boolean add = caches.add(cctx); +add = copy.add(cctx); + +caches = Collections.unmodifiableList(copy); +} assert add : cctx.name(); @@ -335,39 +337,39 @@ public class CacheGroupContext { if (!drEnabled && cctx.isDrEnabled()) drEnabled = true; - -this.caches = caches; } /** * @param cctx Cache context. */ private void removeCacheContext(GridCacheContext cctx) { -ArrayList caches = new ArrayList<>(this.caches); +final List copy; -// It is possible cache was not added in case of errors on cache start. -for (Iterator it = caches.iterator(); it.hasNext();) { -GridCacheContext next = it.next();
ignite git commit: IGNITE-10154 setIgnoredFailureTypes method is removed from FailureHandler interface
Repository: ignite Updated Branches: refs/heads/ignite-2.7 72ca81099 -> 3eb2a31f2 IGNITE-10154 setIgnoredFailureTypes method is removed from FailureHandler interface Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3eb2a31f Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3eb2a31f Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3eb2a31f Branch: refs/heads/ignite-2.7 Commit: 3eb2a31f245b0beb1c9c49a163eeb97646187df2 Parents: 72ca810 Author: Andrey Gura Authored: Tue Nov 13 20:25:11 2018 +0300 Committer: Andrey Gura Committed: Wed Nov 14 16:42:42 2018 +0300 -- .../apache/ignite/failure/AbstractFailureHandler.java | 12 +--- .../java/org/apache/ignite/failure/FailureHandler.java | 6 -- 2 files changed, 9 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/3eb2a31f/modules/core/src/main/java/org/apache/ignite/failure/AbstractFailureHandler.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/failure/AbstractFailureHandler.java b/modules/core/src/main/java/org/apache/ignite/failure/AbstractFailureHandler.java index 59fe403..d3685c0 100644 --- a/modules/core/src/main/java/org/apache/ignite/failure/AbstractFailureHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/failure/AbstractFailureHandler.java @@ -27,15 +27,21 @@ import static org.apache.ignite.failure.FailureType.SYSTEM_WORKER_BLOCKED; /** * Abstract superclass for {@link FailureHandler} implementations. - * Maintains a set of ignored failure types. + * Maintains a set of ignored failure types. Failure handler will not invalidate kernal context for this failures + * and will not handle it. */ public abstract class AbstractFailureHandler implements FailureHandler { /** */ @GridToStringInclude private Set ignoredFailureTypes = Collections.singleton(SYSTEM_WORKER_BLOCKED); -/** {@inheritDoc} */ -@Override public void setIgnoredFailureTypes(Set failureTypes) { +/** + * Sets failure types that must be ignored by failure handler. + * + * @param failureTypes Set of failure type that must be ignored. + * @see FailureType + */ +public void setIgnoredFailureTypes(Set failureTypes) { ignoredFailureTypes = Collections.unmodifiableSet(failureTypes); } http://git-wip-us.apache.org/repos/asf/ignite/blob/3eb2a31f/modules/core/src/main/java/org/apache/ignite/failure/FailureHandler.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/failure/FailureHandler.java b/modules/core/src/main/java/org/apache/ignite/failure/FailureHandler.java index f325e65..8717b16 100644 --- a/modules/core/src/main/java/org/apache/ignite/failure/FailureHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/failure/FailureHandler.java @@ -17,7 +17,6 @@ package org.apache.ignite.failure; -import java.util.Set; import org.apache.ignite.Ignite; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.failure.FailureProcessor; @@ -37,9 +36,4 @@ public interface FailureHandler { * @return Whether kernal context must be invalidated or not. */ public boolean onFailure(Ignite ignite, FailureContext failureCtx); - -/** - * Sets failure types to ignore. - */ -public void setIgnoredFailureTypes(Set failureTypes); }
ignite git commit: IGNITE-10154 setIgnoredFailureTypes method is removed from FailureHandler interface
Repository: ignite Updated Branches: refs/heads/master 21eb0dead -> 59a7986be IGNITE-10154 setIgnoredFailureTypes method is removed from FailureHandler interface Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/59a7986b Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/59a7986b Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/59a7986b Branch: refs/heads/master Commit: 59a7986be1964c960468440e1daf41eea06a0c2f Parents: 21eb0de Author: Andrey Gura Authored: Tue Nov 13 20:25:11 2018 +0300 Committer: Andrey Gura Committed: Wed Nov 14 16:37:06 2018 +0300 -- .../apache/ignite/failure/AbstractFailureHandler.java | 12 +--- .../java/org/apache/ignite/failure/FailureHandler.java | 6 -- 2 files changed, 9 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/59a7986b/modules/core/src/main/java/org/apache/ignite/failure/AbstractFailureHandler.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/failure/AbstractFailureHandler.java b/modules/core/src/main/java/org/apache/ignite/failure/AbstractFailureHandler.java index b055941..285c49d 100644 --- a/modules/core/src/main/java/org/apache/ignite/failure/AbstractFailureHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/failure/AbstractFailureHandler.java @@ -27,15 +27,21 @@ import static org.apache.ignite.failure.FailureType.SYSTEM_WORKER_BLOCKED; /** * Abstract superclass for {@link FailureHandler} implementations. - * Maintains a set of ignored failure types. + * Maintains a set of ignored failure types. Failure handler will not invalidate kernal context for this failures + * and will not handle it. */ public abstract class AbstractFailureHandler implements FailureHandler { /** */ @GridToStringInclude private Set ignoredFailureTypes = Collections.singleton(SYSTEM_WORKER_BLOCKED); -/** {@inheritDoc} */ -@Override public void setIgnoredFailureTypes(Set failureTypes) { +/** + * Sets failure types that must be ignored by failure handler. + * + * @param failureTypes Set of failure type that must be ignored. + * @see FailureType + */ +public void setIgnoredFailureTypes(Set failureTypes) { ignoredFailureTypes = Collections.unmodifiableSet(failureTypes); } http://git-wip-us.apache.org/repos/asf/ignite/blob/59a7986b/modules/core/src/main/java/org/apache/ignite/failure/FailureHandler.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/failure/FailureHandler.java b/modules/core/src/main/java/org/apache/ignite/failure/FailureHandler.java index f325e65..8717b16 100644 --- a/modules/core/src/main/java/org/apache/ignite/failure/FailureHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/failure/FailureHandler.java @@ -17,7 +17,6 @@ package org.apache.ignite.failure; -import java.util.Set; import org.apache.ignite.Ignite; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.failure.FailureProcessor; @@ -37,9 +36,4 @@ public interface FailureHandler { * @return Whether kernal context must be invalidated or not. */ public boolean onFailure(Ignite ignite, FailureContext failureCtx); - -/** - * Sets failure types to ignore. - */ -public void setIgnoredFailureTypes(Set failureTypes); }
ignite git commit: IGNITE-3467: JDBC: Display catalog as "IGNITE". This closes #5061.
Repository: ignite Updated Branches: refs/heads/master b85b041bc -> 21eb0dead IGNITE-3467: JDBC: Display catalog as "IGNITE". This closes #5061. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/21eb0dea Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/21eb0dea Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/21eb0dea Branch: refs/heads/master Commit: 21eb0dead7b709e437434355f58246e0e8c7a3af Parents: b85b041 Author: Pavel Kuznetsov Authored: Wed Nov 14 15:26:54 2018 +0300 Committer: devozerov Committed: Wed Nov 14 15:26:54 2018 +0300 -- .../internal/jdbc2/JdbcMetadataSelfTest.java| 74 +--- .../jdbc/thin/JdbcThinMetadataSelfTest.java | 74 +--- .../jdbc/thin/JdbcThinDatabaseMetadata.java | 38 +- .../internal/jdbc2/JdbcDatabaseMetadata.java| 37 +- 4 files changed, 173 insertions(+), 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/21eb0dea/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java -- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java index a1c36e1..4c127b6 100755 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java @@ -25,6 +25,7 @@ import java.sql.ParameterMetaData; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.ResultSetMetaData; +import java.sql.SQLException; import java.sql.Statement; import java.sql.Types; import java.util.ArrayList; @@ -175,43 +176,99 @@ public class JdbcMetadataSelfTest extends GridCommonAbstractTest { try (Connection conn = DriverManager.getConnection(BASE_URL)) { DatabaseMetaData meta = conn.getMetaData(); -ResultSet rs = meta.getTables("", "pers", "%", new String[]{"TABLE"}); +ResultSet rs = meta.getTables(null, "pers", "%", new String[]{"TABLE"}); assertNotNull(rs); assertTrue(rs.next()); assertEquals("TABLE", rs.getString("TABLE_TYPE")); +assertEquals(JdbcDatabaseMetadata.CATALOG_NAME, rs.getString("TABLE_CAT")); assertEquals("PERSON", rs.getString("TABLE_NAME")); -rs = meta.getTables("", "org", "%", new String[]{"TABLE"}); +rs = meta.getTables(null, "org", "%", new String[]{"TABLE"}); assertNotNull(rs); assertTrue(rs.next()); assertEquals("TABLE", rs.getString("TABLE_TYPE")); +assertEquals(JdbcDatabaseMetadata.CATALOG_NAME, rs.getString("TABLE_CAT")); assertEquals("ORGANIZATION", rs.getString("TABLE_NAME")); -rs = meta.getTables("", "pers", "%", null); +rs = meta.getTables(null, "pers", "%", null); assertNotNull(rs); assertTrue(rs.next()); assertEquals("TABLE", rs.getString("TABLE_TYPE")); +assertEquals(JdbcDatabaseMetadata.CATALOG_NAME, rs.getString("TABLE_CAT")); assertEquals("PERSON", rs.getString("TABLE_NAME")); -rs = meta.getTables("", "org", "%", null); +rs = meta.getTables(null, "org", "%", null); assertNotNull(rs); assertTrue(rs.next()); assertEquals("TABLE", rs.getString("TABLE_TYPE")); +assertEquals(JdbcDatabaseMetadata.CATALOG_NAME, rs.getString("TABLE_CAT")); assertEquals("ORGANIZATION", rs.getString("TABLE_NAME")); -rs = meta.getTables("", "PUBLIC", "", new String[]{"WRONG"}); +rs = meta.getTables(null, "PUBLIC", "", new String[]{"WRONG"}); assertFalse(rs.next()); } } /** + * Negative scenarios for catalog name. + * Perform metadata lookups, that use incorrect catalog names. + */ +public void testCatalogWithNotExistingName() throws SQLException { +checkNoEntitiesFoundForCatalog(""); +checkNoEntitiesFoundForCatalog("NOT_EXISTING_CATALOG"); +} + +/** + * Check that lookup in the metadata have been performed using specified catalog name (that is neither {@code null} + * nor correct catalog name), empty result set is returned. + * + * @param invalidCat catalog name that is not either + */ +private void checkNoEntitiesFoundForCatalog(String invalidCat) throws SQLException { +try (Connection conn = DriverManager.getConnection(BASE_URL)) { +DatabaseMetaData meta = conn.getMetaData(); + +//
ignite git commit: IGNITE-7955: MVCC: IgniteCache.localPeek operation support. This closes #5284.
Repository: ignite Updated Branches: refs/heads/master 00b9e89e7 -> b85b041bc IGNITE-7955: MVCC: IgniteCache.localPeek operation support. This closes #5284. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b85b041b Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b85b041b Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b85b041b Branch: refs/heads/master Commit: b85b041bcbf199b94a16c9f09dd9d2685f65cbc3 Parents: 00b9e89 Author: ipavlukhin Authored: Wed Nov 14 15:16:58 2018 +0300 Committer: devozerov Committed: Wed Nov 14 15:16:58 2018 +0300 -- .../java/org/apache/ignite/IgniteCache.java | 4 +- .../processors/cache/GridCacheAdapter.java | 7 +- .../processors/cache/GridCacheEntryEx.java | 10 ++ .../processors/cache/GridCacheMapEntry.java | 21 +++ .../processors/cache/mvcc/MvccUtils.java| 8 +- .../processors/cache/GridCacheTestEntryEx.java | 8 +- .../mvcc/CacheMvccOperationChecksTest.java | 8 - .../cache/mvcc/MvccCachePeekTest.java | 161 +++ .../testsuites/IgniteCacheMvccTestSuite.java| 41 + 9 files changed, 248 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/b85b041b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java index 70ee0d5..395c8f8 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java @@ -441,9 +441,9 @@ public interface IgniteCache extends javax.cache.Cache, IgniteAsyncS public void localEvict(Collection keys); /** - * Peeks at in-memory cached value using default optional peek mode. + * Peeks at a value in the local storage using an optional peek mode. * - * This method will not load value from any persistent store or from a remote node. + * This method will not load a value from the configured {@link CacheStore} or from a remote node. * Transactions * This method does not participate in any transactions. * http://git-wip-us.apache.org/repos/asf/ignite/blob/b85b041b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java index 8ae3450..18a4da4 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java @@ -821,9 +821,6 @@ public abstract class GridCacheAdapter implements IgniteInternalCache implements IgniteInternalCachehttp://git-wip-us.apache.org/repos/asf/ignite/blob/b85b041b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java index cfd70ec..319c134 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java @@ -713,6 +713,16 @@ public interface GridCacheEntryEx { public boolean checkSerializableReadVersion(GridCacheVersion serReadVer) throws GridCacheEntryRemovedException; /** + * Retrieves the last committed MVCC entry version. + * @param onheapOnly {@code True} if a specified peek mode instructs to look only in the on-heap storage. + * @return Last committed entry if either or {@code null} otherwise. + * @throws GridCacheEntryRemovedException If entry has been removed. + * @throws IgniteCheckedException If failed. + */ +@Nullable public CacheObject mvccPeek(boolean onheapOnly) +throws GridCacheEntryRemovedException, IgniteCheckedException; + +/** * Peeks into entry without loading value or updating statistics. * * @param heap Read from heap flag. http://git-wip-us.apache.org/repos/asf/ignite/blob/b85b041b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java -- diff --git
ignite git commit: IGNITE-10235 Do not register cache in QueryManager twice if parallel caches start is disabled - Fixes #5381.
Repository: ignite Updated Branches: refs/heads/master bb3bbb930 -> 00b9e89e7 IGNITE-10235 Do not register cache in QueryManager twice if parallel caches start is disabled - Fixes #5381. Signed-off-by: Alexey Goncharuk Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/00b9e89e Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/00b9e89e Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/00b9e89e Branch: refs/heads/master Commit: 00b9e89e7add9c58ed9a996aaba9200267c71961 Parents: bb3bbb9 Author: Sergey Antonov Authored: Wed Nov 14 15:12:56 2018 +0300 Committer: Alexey Goncharuk Committed: Wed Nov 14 15:12:56 2018 +0300 -- .../processors/cache/GridCacheProcessor.java| 7 +- .../cache/StartCachesInParallelTest.java| 148 +++ ...acheWithIndexingAndPersistenceTestSuite.java | 2 + 3 files changed, 154 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/00b9e89e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java -- diff --git 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 index 7ba4ff9..23c3623 100644 --- 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 @@ -2195,12 +2195,13 @@ public class GridCacheProcessor extends GridProcessorAdapter { ) throws IgniteCheckedException { GridCacheContext cacheCtx = prepareCacheContext(startCfg, desc, reqNearCfg, exchTopVer, disabledAfterStart); -ctx.query().onCacheStart(cacheCtx, desc.schema() != null ? desc.schema() : new QuerySchema(), desc.sql()); - if (cacheCtx.isRecoveryMode()) finishRecovery(exchTopVer, cacheCtx); -else +else { +ctx.query().onCacheStart(cacheCtx, desc.schema() != null ? desc.schema() : new QuerySchema(), desc.sql()); + onCacheStarted(cacheCtx); +} } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/00b9e89e/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/StartCachesInParallelTest.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/StartCachesInParallelTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/StartCachesInParallelTest.java new file mode 100644 index 000..e48c294 --- /dev/null +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/StartCachesInParallelTest.java @@ -0,0 +1,148 @@ +/* + * 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.internal.processors.cache; + +import org.apache.ignite.Ignite; +import org.apache.ignite.configuration.CacheConfiguration; +import org.apache.ignite.configuration.DataRegionConfiguration; +import org.apache.ignite.configuration.DataStorageConfiguration; +import org.apache.ignite.configuration.IgniteConfiguration; +import org.apache.ignite.failure.FailureContext; +import org.apache.ignite.failure.StopNodeFailureHandler; +import org.apache.ignite.internal.IgniteEx; +import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; + +import static org.apache.ignite.IgniteSystemProperties.IGNITE_ALLOW_START_CACHES_IN_PARALLEL; + +/** + * Tests, that cluster could start and activate with all possible values of IGNITE_ALLOW_START_CACHES_IN_PARALLEL. + */ +public class StartCachesInParallelTest extends GridCommonAbstractTest { +/** IGNITE_ALLOW_START_CACHES_IN_PARALLEL option value before tests. */ +private String allowParallel; + +/** Test failure handler. */ +private TestStopNodeFailureHandler
[ignite-teamcity-bot] branch ignite-10243 updated (06a61f7 -> e02db4f)
This is an automated email from the ASF dual-hosted git repository. dpavlov pushed a change to branch ignite-10243 in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git. from 06a61f7 IGNITE-10243 Chain analysis entry points are get now from preloaded builds supporting cancelled add fc0905c IGNITE-10215 Suite critical failures registration added - Fixes #70. new 10d13c5 Merge branch 'master' into ignite-10243 new e02db4f IGNITE-10243 Cancelled is now shown as problem The 2 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: .../org/apache/ignite/ci/IgnitePersistentTeamcity.java| 10 ++ .../org/apache/ignite/ci/IgniteTeamcityConnection.java| 7 +++ .../src/main/java/org/apache/ignite/ci/TcHelper.java | 2 +- .../org/apache/ignite/ci/analysis/MultBuildRunCtx.java| 15 ++- .../org/apache/ignite/ci/analysis/SingleBuildRunCtx.java | 4 .../ignite/ci/teamcity/ignited/BuildRefCompacted.java | 6 +- .../teamcity/ignited/fatbuild/ProactiveFatBuildSync.java | 2 +- .../org/apache/ignite/ci/teamcity/pure/ITeamcityConn.java | 4 .../ci/web/model/current/ChainAtServerCurrentStatus.java | 3 ++- .../ignite/ci/web/model/current/SuiteCurrentStatus.java | 9 ++--- 10 files changed, 50 insertions(+), 12 deletions(-)
[ignite-teamcity-bot] 02/02: IGNITE-10243 Cancelled is now shown as problem
This is an automated email from the ASF dual-hosted git repository. dpavlov pushed a commit to branch ignite-10243 in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git commit e02db4f70af3028d34f3d943165a75aa45b43c1e Author: Dmitriy Pavlov AuthorDate: Wed Nov 14 14:47:12 2018 +0300 IGNITE-10243 Cancelled is now shown as problem --- .../src/main/java/org/apache/ignite/ci/TcHelper.java | 2 +- .../org/apache/ignite/ci/analysis/MultBuildRunCtx.java| 15 ++- .../org/apache/ignite/ci/analysis/SingleBuildRunCtx.java | 4 .../ignite/ci/teamcity/ignited/BuildRefCompacted.java | 6 +- .../ci/web/model/current/ChainAtServerCurrentStatus.java | 3 ++- .../ignite/ci/web/model/current/SuiteCurrentStatus.java | 9 ++--- 6 files changed, 28 insertions(+), 11 deletions(-) diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/TcHelper.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/TcHelper.java index 44facf2..12a4f03 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/TcHelper.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/TcHelper.java @@ -330,7 +330,7 @@ public class TcHelper implements ITcHelper, IJiraIntegration { } if (failType != null) -fails.computeIfAbsent(failType, k->new ArrayList<>()).add(suite); +fails.computeIfAbsent(failType, k -> new ArrayList<>()).add(suite); } return fails; diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/MultBuildRunCtx.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/MultBuildRunCtx.java index 56613c2..50679a2 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/MultBuildRunCtx.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/MultBuildRunCtx.java @@ -95,6 +95,10 @@ public class MultBuildRunCtx implements ISuiteResults { .anyMatch(p -> !p.isFailedTests(compactor) && !p.isSnapshotDepProblem(compactor)); } +public boolean onlyCancelledBuilds() { +return buildsStream().allMatch(bCtx -> !bCtx.isComposite() && bCtx.isCancelled()); +} + @NotNull private Stream allProblemsInAllBuilds() { return buildsStream().flatMap(SingleBuildRunCtx::getProblemsStream); @@ -152,6 +156,15 @@ public class MultBuildRunCtx implements ISuiteResults { public String getResult() { StringBuilder res = new StringBuilder(); +long cancelledCnt = buildsStream().filter(bCtx -> !bCtx.isComposite() && bCtx.isCancelled()).count(); + +if (cancelledCnt > 0) { +res.append("CANCELLED"); + +if (cancelledCnt > 1) +res.append(" ").append(cancelledCnt); +} + addKnownProblemCnt(res, "TIMEOUT", getExecutionTimeoutCount()); addKnownProblemCnt(res, "JVM CRASH", getJvmCrashProblemCount()); addKnownProblemCnt(res, "Out Of Memory Error", getOomeProblemCount()); @@ -257,7 +270,7 @@ public class MultBuildRunCtx implements ISuiteResults { } boolean isFailed() { -return failedTests() != 0 || hasAnyBuildProblemExceptTestOrSnapshot(); +return failedTests() != 0 || hasAnyBuildProblemExceptTestOrSnapshot() || onlyCancelledBuilds(); } public String branchName() { diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/SingleBuildRunCtx.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/SingleBuildRunCtx.java index 5560929..942d890 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/SingleBuildRunCtx.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/SingleBuildRunCtx.java @@ -201,4 +201,8 @@ public class SingleBuildRunCtx implements ISuiteResults { this.changes.clear(); this.changes.addAll(changes); } + +public boolean isCancelled() { +return buildCompacted.isCancelled(compactor); +} } diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/BuildRefCompacted.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/BuildRefCompacted.java index a0f6d36..61f984a 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/BuildRefCompacted.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/BuildRefCompacted.java @@ -155,7 +155,11 @@ public class BuildRefCompacted { } public boolean isNotCancelled(IStringCompactor compactor) { -return !hasUnknownStatus(compactor); +return !isCancelled(compactor); +} + +public boolean isCancelled(IStringCompactor compactor) { +return hasUnknownStatus(compactor); } private boolean hasUnknownStatus(IStringCompactor compactor) { diff --git
[ignite-teamcity-bot] 01/02: Merge branch 'master' into ignite-10243
This is an automated email from the ASF dual-hosted git repository. dpavlov pushed a commit to branch ignite-10243 in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git commit 10d13c5a4b686ef1b7982b05a9ef8f3a172c15a9 Merge: 06a61f7 fc0905c Author: Dmitriy Pavlov AuthorDate: Wed Nov 14 13:00:02 2018 +0300 Merge branch 'master' into ignite-10243 .../java/org/apache/ignite/ci/IgnitePersistentTeamcity.java| 10 ++ .../java/org/apache/ignite/ci/IgniteTeamcityConnection.java| 7 +++ .../ci/teamcity/ignited/fatbuild/ProactiveFatBuildSync.java| 2 +- .../java/org/apache/ignite/ci/teamcity/pure/ITeamcityConn.java | 4 4 files changed, 22 insertions(+), 1 deletion(-)
[ignite-teamcity-bot] branch master updated: IGNITE-10215 Suite critical failures registration added - Fixes #70.
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 fc0905c IGNITE-10215 Suite critical failures registration added - Fixes #70. fc0905c is described below commit fc0905cd45760e0a815fcaae7269c2b6e6b153fa Author: ololo3000 AuthorDate: Wed Nov 14 12:04:49 2018 +0300 IGNITE-10215 Suite critical failures registration added - Fixes #70. Signed-off-by: Dmitriy Pavlov --- .../java/org/apache/ignite/ci/IgnitePersistentTeamcity.java| 10 ++ .../java/org/apache/ignite/ci/IgniteTeamcityConnection.java| 7 +++ .../ci/teamcity/ignited/fatbuild/ProactiveFatBuildSync.java| 2 +- .../java/org/apache/ignite/ci/teamcity/pure/ITeamcityConn.java | 4 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java index e970c97..e9befbe 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java @@ -1116,6 +1116,16 @@ public class IgnitePersistentTeamcity implements IAnalyticsEnabledTeamcity, ITea return teamcity.getProblems(buildId); } +/** {@inheritDoc} */ +@Deprecated +@Override public ProblemOccurrences getProblemsAndRegisterCtiticals(BuildRef build) { +ProblemOccurrences problems = teamcity.getProblems(build.getId()); + +registerCriticalBuildProblemInStat(build, problems); + +return problems; +} + @Override public Statistics getStatistics(int buildId) { return teamcity.getStatistics(buildId); diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgniteTeamcityConnection.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgniteTeamcityConnection.java index 5f044c0..7177654 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgniteTeamcityConnection.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgniteTeamcityConnection.java @@ -317,6 +317,13 @@ public class IgniteTeamcityConnection implements ITeamcity { } } +/** {@inheritDoc} */ +@Deprecated +@AutoProfiling +@Override public ProblemOccurrences getProblemsAndRegisterCtiticals(BuildRef build) { +return getProblems(build.getId()); +} + @Override @AutoProfiling public ProblemOccurrences getProblems(int buildId) { diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/fatbuild/ProactiveFatBuildSync.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/fatbuild/ProactiveFatBuildSync.java index dd111dd..3eab437 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/fatbuild/ProactiveFatBuildSync.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/fatbuild/ProactiveFatBuildSync.java @@ -287,7 +287,7 @@ public class ProactiveFatBuildSync { } if (build.problemOccurrences != null) -problems = conn.getProblems(buildId).getProblemsNonNull(); +problems = conn.getProblemsAndRegisterCtiticals(build).getProblemsNonNull(); if (build.statisticsRef != null) statistics = conn.getStatistics(buildId); diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/pure/ITeamcityConn.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/pure/ITeamcityConn.java index 52ae38b..27dda7e 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/pure/ITeamcityConn.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/pure/ITeamcityConn.java @@ -72,4 +72,8 @@ public interface ITeamcityConn { ChangesList getChangesList(int buildId); Change getChange(int changeId); + +/** */ +@Deprecated +ProblemOccurrences getProblemsAndRegisterCtiticals(BuildRef build); }