You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2018/11/20 11:35:24 UTC
ignite git commit: IGNITE-10328 Allow to destroy cache in code which
were created via SQL - Fixes #5431.
Repository: ignite
Updated Branches:
refs/heads/master 070819a52 -> c8fd687fc
IGNITE-10328 Allow to destroy cache in code which were created via SQL - Fixes #5431.
Signed-off-by: Alexey Goncharuk <al...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c8fd687f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c8fd687f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c8fd687f
Branch: refs/heads/master
Commit: c8fd687fca7562d0560c8afc734b56f73edc76cf
Parents: 070819a
Author: EdShangGG <es...@gridgain.com>
Authored: Tue Nov 20 11:39:19 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Tue Nov 20 14:29:33 2018 +0300
----------------------------------------------------------------------
.../internal/processors/cache/ClusterCachesInfo.java | 8 --------
.../processors/cache/index/H2DynamicTableSelfTest.java | 11 ++---------
2 files changed, 2 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/c8fd687f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
----------------------------------------------------------------------
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 6ab4e67..6718cf3 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
@@ -671,14 +671,6 @@ class ClusterCachesInfo {
continue;
}
- if (!req.sql() && desc.sql()) {
- ctx.cache().completeCacheStartFuture(req, false,
- new IgniteCheckedException("Only cache created with cache API may be removed with " +
- "direct call to destroyCache [cacheName=" + req.cacheName() + ']'));
-
- continue;
- }
-
DynamicCacheDescriptor old = registeredCaches.remove(req.cacheName());
if (req.restart())
http://git-wip-us.apache.org/repos/asf/ignite/blob/c8fd687f/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicTableSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicTableSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicTableSelfTest.java
index 0e06e35..07c0ede 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicTableSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicTableSelfTest.java
@@ -808,7 +808,7 @@ public class H2DynamicTableSelfTest extends AbstractSchemaSelfTest {
}
/**
- * Test that attempting to destroy via cache API a cache created via SQL yields an error.
+ * Test that attempting to destroy via cache API a cache created via SQL finishes successfully.
* @throws Exception if failed.
*/
public void testDestroyDynamicSqlCache() throws Exception {
@@ -816,14 +816,7 @@ public class H2DynamicTableSelfTest extends AbstractSchemaSelfTest {
" \"name\" varchar, \"surname\" varchar, \"age\" int, PRIMARY KEY (\"id\", \"city\")) WITH " +
"\"template=cache\"");
- GridTestUtils.assertThrows(null, new Callable<Object>() {
- @Override public Object call() throws Exception {
- client().destroyCache(cacheName("Person"));
-
- return null;
- }
- }, CacheException.class,
- "Only cache created with cache API may be removed with direct call to destroyCache");
+ client().destroyCache(cacheName("Person"));
}
/**