Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
6.6.0
-
Untriaged
-
1
-
Yes
-
CX Sprint 209
Description
We (Java SDK folk) are now running our CI tests against 6.6, which has found this minor regression.
The test is:
@Test
|
void dropDatasetFailsIfAbsent() { |
assertThrows(DatasetNotFoundException.class, () -> analytics.dropDataset("foo", |
dropDatasetAnalyticsOptions()
|
.dataverseName("absentDataverse"))); |
}
|
|
In 6.6 this now fails as it raises a DataverseNotFoundException rather than DatasetNotFoundException, as cbas now returns a 24034 code. In this test and the one below too, neither "foo" nor "absentDataverse" exist.
This causes problems for our `ignoreIfNotExist` option, which allows dropping datasets and silently ignoring if they don't exist. Because that logic is expecting a DataverseNotFoundException.
E.g. this other test fails with a DataverseNotFoundException, when you would expect it to succeed. This test also passed in 6.5.
@Test
|
void dropDatasetCanIgnoreAbsent() { |
analytics.dropDataset("foo", |
dropDatasetAnalyticsOptions()
|
.ignoreIfNotExists(true) |
.dataverseName("absentDataverse")); |
}
|
|
For both tests, if I don't specify a dataverseName then the tests pass as expected.
Attachments
For Gerrit Dashboard: MB-40577 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
133170,3 | MB-40577: DROP DATASET IF EXISTS must not fail if dataverse not found | mad-hatter | cbas-core | Status: MERGED | +2 | +1 |
Activity
Field | Original Value | New Value |
---|---|---|
Priority | Minor [ 4 ] | Major [ 3 ] |
Description |
We (Java SDK folk) are now running our CI tests against 6.6, which has found this minor regression.
The test is: {code:java} @Test void dropDatasetFailsIfAbsent() { assertThrows(DatasetNotFoundException.class, () -> analytics.dropDataset("foo", dropDatasetAnalyticsOptions() .dataverseName("absentDataverse"))); } {code} In 6.6 this now fails as it raises a DataverseNotFoundException rather than DatasetNotFoundException, as cbas now returns a 24034 code. This causes problems for our `ignoreIfNotExist` option, which allows dropping datasets and silently ignoring if they don't exist. Because that logic is expecting a DataverseNotFoundException. E.g. this other test fails with a DataverseNotFoundException, when you would expect it to succeed (neither "foo" nor "absentDataverse" exist). This test also passed in 6.5. {code:java} @Test void dropDatasetCanIgnoreAbsent() { analytics.dropDataset("foo", dropDatasetAnalyticsOptions() .ignoreIfNotExists(true) .dataverseName("absentDataverse")); } {code} |
We (Java SDK folk) are now running our CI tests against 6.6, which has found this minor regression.
The test is: {code:java}@Test void dropDatasetFailsIfAbsent() { assertThrows(DatasetNotFoundException.class, () -> analytics.dropDataset("foo", dropDatasetAnalyticsOptions() .dataverseName("absentDataverse"))); } {code} In 6.6 this now fails as it raises a DataverseNotFoundException rather than DatasetNotFoundException, as cbas now returns a 24034 code. In this test and the one below too, neither "foo" nor "absentDataverse" exist. This causes problems for our `ignoreIfNotExist` option, which allows dropping datasets and silently ignoring if they don't exist. Because that logic is expecting a DataverseNotFoundException. E.g. this other test fails with a DataverseNotFoundException, when you would expect it to succeed. This test also passed in 6.5. {code:java}@Test void dropDatasetCanIgnoreAbsent() { analytics.dropDataset("foo", dropDatasetAnalyticsOptions() .ignoreIfNotExists(true) .dataverseName("absentDataverse")); } {code} For both tests, if I don't specify a dataverseName then the tests pass as expected. |
Rank | Ranked higher |
Affects Version/s | 6.6.0 [ 16787 ] |
Labels | triaged |
Assignee | Till Westmann [ till ] | Dmitry Lychagin [ dmitry.lychagin ] |
Fix Version/s | 6.6.0 [ 16787 ] |
Is this a Regression? | Unknown [ 10452 ] | Yes [ 10450 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Link | This issue blocks MB-38724 [ MB-38724 ] |
Labels | triaged | approved-for-6.6.0 triaged |
Due Date | 24/Jul/20 |
Sprint | CX Sprint 209 [ 1167 ] |
Link | This issue relates to MB-40592 [ MB-40592 ] |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Resolved [ 5 ] |
Assignee | Dmitry Lychagin [ dmitry.lychagin ] | Arunkumar Senthilnathan [ arunkumar ] |
Labels | approved-for-6.6.0 triaged | approved-for-6.6.0 combination_testing triaged |
Assignee | Arunkumar Senthilnathan [ arunkumar ] | Will Broadbelt [ will.broadbelt ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
This behavior was changed by https://issues.couchbase.com/browse/MB-39142 , specifically:
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/6203/8/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java#1576
Graham Pople,
We discussed this issue today and believe the new error code better explains the problem to the end user because it's more specific ("dataverse not found" instead of "dataset not found").
Could you consider fixing it on your side? If ignoreIfNotExists=true then do not fail on either DataverseNotFoundException or DatasetNotFoundException?