[
https://issues.apache.org/jira/browse/UNOMI-999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Serge Huber updated UNOMI-999:
------------------------------
Description:
h3. Summary
The REST call that deletes the data of a scope (DELETE on /cxs/cluster/
followed by the scope name) should remove only the data of that scope.
With Elasticsearch in 4.0, it removes all the data of the current tenant,
whatever the scope: profiles, events, rules, segments and so on. In 3.0.1 the
same call removed only the given scope. The OpenSearch version works as
expected.
The goal of this ticket is that the call removes only the data of the requested
scope, in the current tenant.
h3. Ways to explore
* Filter on both the scope and the tenant, as the OpenSearch version does.
* Always keep the tenant condition. The scope only narrows the deletion further.
h3. How to test
Manual check: in one tenant, create items in two scopes. Create items in a
second tenant too. Delete one scope. Only the items of that scope, in that
tenant, must be gone.
Automated tests to add. Each must fail on the 4.0.0 release candidate and pass
once the fix is in:
* A persistence integration test, run on both Elasticsearch and OpenSearch. Set
up items of several types (profiles, events, sessions, rules) in scopes A and B
of tenant 1, and in scope A of tenant 2. Delete scope A in tenant 1. Check that
only the items of scope A in tenant 1 are gone, and that everything else is
still there.
* The same test for the in-memory persistence used by unit tests, so all
implementations behave the same.
* A REST-level test of the delete call that checks the same result through the
endpoint.
was:
h3. Summary
The REST call that deletes the data of a scope (DELETE on /cxs/cluster/
followed by the scope name) should remove only the data of that scope.
With Elasticsearch in 4.0, it removes all the data of the current tenant,
whatever the scope: profiles, events, rules, segments and so on. In 3.0.1 the
same call removed only the given scope. The OpenSearch version works as
expected.
The goal of this ticket is that the call removes only the data of the requested
scope, in the current tenant.
h3. Ways to explore
* Filter on both the scope and the tenant, as the OpenSearch version does.
* Always keep the tenant condition. The scope only narrows the deletion further.
h3. How to test
In one tenant, create items in two scopes. Create items in a second tenant too.
Delete one scope. Only the items of that scope, in that tenant, must be gone.
Check on both Elasticsearch and OpenSearch.
> Deleting the data of one scope deletes all the data of the tenant
> -----------------------------------------------------------------
>
> Key: UNOMI-999
> URL: https://issues.apache.org/jira/browse/UNOMI-999
> Project: Apache Unomi
> Issue Type: Bug
> Affects Versions: unomi-4.0.0
> Reporter: Serge Huber
> Priority: Blocker
> Fix For: unomi-4.0.0
>
>
> h3. Summary
> The REST call that deletes the data of a scope (DELETE on /cxs/cluster/
> followed by the scope name) should remove only the data of that scope.
> With Elasticsearch in 4.0, it removes all the data of the current tenant,
> whatever the scope: profiles, events, rules, segments and so on. In 3.0.1 the
> same call removed only the given scope. The OpenSearch version works as
> expected.
> The goal of this ticket is that the call removes only the data of the
> requested scope, in the current tenant.
> h3. Ways to explore
> * Filter on both the scope and the tenant, as the OpenSearch version does.
> * Always keep the tenant condition. The scope only narrows the deletion
> further.
> h3. How to test
> Manual check: in one tenant, create items in two scopes. Create items in a
> second tenant too. Delete one scope. Only the items of that scope, in that
> tenant, must be gone.
> Automated tests to add. Each must fail on the 4.0.0 release candidate and
> pass once the fix is in:
> * A persistence integration test, run on both Elasticsearch and OpenSearch.
> Set up items of several types (profiles, events, sessions, rules) in scopes A
> and B of tenant 1, and in scope A of tenant 2. Delete scope A in tenant 1.
> Check that only the items of scope A in tenant 1 are gone, and that
> everything else is still there.
> * The same test for the in-memory persistence used by unit tests, so all
> implementations behave the same.
> * A REST-level test of the delete call that checks the same result through
> the endpoint.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)