Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Drop a non-existing partition will not raise exception #28722

Closed
1 task done
NicoYuan1986 opened this issue Nov 24, 2023 · 6 comments
Closed
1 task done

[Bug]: Drop a non-existing partition will not raise exception #28722

NicoYuan1986 opened this issue Nov 24, 2023 · 6 comments
Assignees
Labels
kind/bug Issues or changes related a bug stale indicates no udpates for 30 days triage/accepted Indicates an issue or PR is ready to be actively worked on.
Milestone

Comments

@NicoYuan1986
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version: f9be9a2
- Deployment mode(standalone or cluster): standalone
- MQ type(rocksmq, pulsar or kafka):    rocksmq
- SDK version(e.g. pymilvus v2.0.0rc2): 2.3.3.post1.dev3
- OS(Ubuntu or CentOS): 
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

Drop a non-existing partition will not raise exception.
https://jenkins.milvus.io:18080/blue/organizations/jenkins/Milvus%20HA%20CI/detail/PR-28636/6/pipeline/164/

[2023-11-24T07:14:18.380Z]     @pytest.mark.tags(CaseLabel.L1)
[2023-11-24T07:14:18.380Z]     def test_partition_drop_partition_twice(self):
[2023-11-24T07:14:18.380Z]         """
[2023-11-24T07:14:18.380Z]         target: verify drop the same partition twice
[2023-11-24T07:14:18.380Z]         method: 1.create a partition with default schema
[2023-11-24T07:14:18.380Z]                 2. drop the partition
[2023-11-24T07:14:18.380Z]                 3. drop the same partition again
[2023-11-24T07:14:18.380Z]         expected: raise exception for 2nd time
[2023-11-24T07:14:18.380Z]         """
[2023-11-24T07:14:18.380Z]         # create collection
[2023-11-24T07:14:18.380Z]         collection_w = self.init_collection_wrap()
[2023-11-24T07:14:18.380Z]     
[2023-11-24T07:14:18.380Z]         # create partition
[2023-11-24T07:14:18.380Z]         partition_name = cf.gen_unique_str(prefix)
[2023-11-24T07:14:18.380Z]         partition_w = self.init_partition_wrap(collection_w, partition_name)
[2023-11-24T07:14:18.380Z]         collection_w.has_partition(partition_name)
[2023-11-24T07:14:18.380Z]     
[2023-11-24T07:14:18.380Z]         # drop partition
[2023-11-24T07:14:18.380Z]         partition_w.drop()
[2023-11-24T07:14:18.380Z]         assert not collection_w.has_partition(partition_name)[0]
[2023-11-24T07:14:18.380Z]     
[2023-11-24T07:14:18.380Z]         # verify that drop the partition again with exception
[2023-11-24T07:14:18.380Z]         partition_w.drop(check_task=CheckTasks.err_res,
[2023-11-24T07:14:18.380Z] >                        check_items={ct.err_code: 1, ct.err_msg: PartitionErrorMessage.PartitionNotExist})
[2023-11-24T07:14:18.380Z] E       AttributeError: type object 'PartitionErrorMessage' has no attribute 'PartitionNotExist'
[2023-11-24T07:14:18.380Z] 

Expected Behavior

raise exception

Steps To Reproduce

No response

Milvus Log

No response

Anything else?

No response

@NicoYuan1986 NicoYuan1986 added kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 24, 2023
@NicoYuan1986 NicoYuan1986 added this to the 2.4.0 milestone Nov 24, 2023
@yanliang567
Copy link
Contributor

/assign @czs007
/unassign

@sre-ci-robot sre-ci-robot assigned czs007 and unassigned yanliang567 Nov 24, 2023
@yanliang567 yanliang567 added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 24, 2023
@smellthemoon
Copy link
Contributor

smellthemoon commented Nov 24, 2023

milvus-io/pymilvus#1792 has removed PartitionNotExist, 1. need to adjust the related ut message. @NicoYuan1986 can you help with it? 2. test local, if drop a non-existing collection, no error throw. no need to throw partition not exist here(keep Idempotent).

@smellthemoon
Copy link
Contributor

/assign

sre-ci-robot pushed a commit that referenced this issue Nov 29, 2023
1. Drop a non-existing partition will not raise error now. #28722
2. Search will not raise error now when some row has less elements than
expression index. #28293

Signed-off-by: nico <[email protected]>
@NicoYuan1986
Copy link
Contributor Author

Here master branch still raise error: code=200, message=partition not found[partition=partition__BHV6nRZI]

Please keep the master branch and the 2.3.x branch consistent. @smellthemoon @yah01

@yah01
Copy link
Member

yah01 commented Dec 1, 2023

/assign @smellthemoon

Copy link

stale bot commented Jan 2, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Rotten issues close after 30d of inactivity. Reopen the issue with /reopen.

@stale stale bot added the stale indicates no udpates for 30 days label Jan 2, 2024
@stale stale bot closed this as completed Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues or changes related a bug stale indicates no udpates for 30 days triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

5 participants