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: stuck in a certain case #96

Closed
BeautyyuYanli opened this issue Oct 18, 2023 · 2 comments
Closed

bug: stuck in a certain case #96

BeautyyuYanli opened this issue Oct 18, 2023 · 2 comments

Comments

@BeautyyuYanli
Copy link
Contributor

BeautyyuYanli commented Oct 18, 2023

postgres=# drop table test;
DROP TABLE
postgres=# create table test (embedding vector(3) not null);
CREATE TABLE
postgres=# CREATE INDEX ON test USING vectors (embedding l2_ops)
WITH (options = "capacity = 2097152");
CREATE INDEX
postgres=# insert into test (embedding) values (Array[1,2]::real[]);
ERROR:  called `Result::unwrap()` on an `Err` value: Closed
postgres=# insert into test (embedding) values (Array[1,2,3]::real[]);
<< stuck here >>

I build the index on an empty table and then try inserting a bad vector into it, then inserting another normal vector. It gets stuck.

Potential solution:

  • Check the dimension when inserting a new vector, to prevent unexpected behaviors.
  • Handle the Err to release locks
@usamoi
Copy link
Collaborator

usamoi commented Oct 19, 2023

Probably we need to add a check in our code.

@usamoi
Copy link
Collaborator

usamoi commented Nov 9, 2023

Completed by #117.

@usamoi usamoi closed this as completed Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants