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

Decoding failure when deleting documents #1601

Closed
Sembiance opened this issue Aug 20, 2021 · 2 comments · Fixed by #1605
Closed

Decoding failure when deleting documents #1601

Sembiance opened this issue Aug 20, 2021 · 2 comments · Fixed by #1605
Labels
bug Something isn't working as expected
Projects
Milestone

Comments

@Sembiance
Copy link

Describe the bug
Attempting to delete any document from a dataset below results in an error:

  {
    "status": "failed",
    "updateId": 2,
    "type": {
      "name": "DocumentsDeletion",
      "number": 1
    },
    "message": "internal: decoding failed",
    "errorCode": "internal",
    "errorType": "internal_error",
    "errorLink": "https://docs.meilisearch.com/errors#internal",
    "duration": 0.0,
    "enqueuedAt": "2021-08-20T01:05:08.859222412Z",
    "processedAt": "2021-08-20T01:05:08.860058643Z"
  }

To Reproduce

  1. Run meilisearch v0.21.0rc6
  2. Create the index :
    curl -X POST 'http://localhost:7700/indexes' --data '{"uid": "test", "primaryKey": "docid"}'
    curl -X POST 'http://localhost:7700/indexes/test/settings' --data '{"filterableAttributes": ["label"]}'
  3. Populate the data:
curl -X POST 'http://localhost:7700/indexes/test/documents' --data '[
	{"docid":"1_4","label":"sign"},
	{"docid":"1_5","label":"letter"},
	{"docid":"1_7","label":"abstract,cartoon,design,pattern"},
	{"docid":"1_36","label":"drawing,painting,pattern"},
	{"docid":"1_37","label":"art,drawing,outdoor"},
	{"docid":"1_38","label":"aquarium,art,drawing"},
	{"docid":"1_39","label":"abstract"},
	{"docid":"1_40","label":"cartoon"},
	{"docid":"1_41","label":"art,drawing"},
	{"docid":"1_42","label":"art,pattern"},
	{"docid":"1_43","label":"abstract,art,drawing,pattern"},
	{"docid":"1_44","label":"drawing"},
	{"docid":"1_45","label":"art"},
	{"docid":"1_46","label":"abstract,colorfulness,pattern"},
	{"docid":"1_47","label":"abstract,pattern"},
	{"docid":"1_52","label":"abstract,cartoon"},
	{"docid":"1_57","label":"abstract,drawing,pattern"},
	{"docid":"1_58","label":"abstract,art,cartoon"},
	{"docid":"1_68","label":"design"},
	{"docid":"1_69","label":"geometry"}]'
  1. Attempt to delete any document: curl -X DELETE 'http://localhost:7700/indexes/test/documents/1_4'
  2. Check the status, see it failed: curl -X GET 'http://localhost:7700/indexes/test/updates'

Expected behavior
I expect it not to fail.

MeiliSearch version: v0.21.0rc6
Works fine with v0.20.0

Additional context
If you skip modifying the filterableAttributes index settings, then it works ok. So it must have something to do with that.
Note, if you change it to "filterableAttributes": ["doc_id"] it still fails with the same internal: decoding failed error

@curquiza
Copy link
Member

curquiza commented Aug 20, 2021

Hello @Sembiance! Thank you so much for this report and for the detailed steps! 🙏 I think this is the same bug as #1594 we did not succeed to reproduce!

I followed your steps and I got the same error as you report!
We'll fix this for v0.21.0

@curquiza curquiza added this to Candidates in Bug triage via automation Aug 20, 2021
@curquiza curquiza added the bug Something isn't working as expected label Aug 20, 2021
@curquiza curquiza moved this from Candidates to Bugs - severity 1 🔥 in Bug triage Aug 20, 2021
@curquiza curquiza added this to the v0.21.0 milestone Aug 20, 2021
@curquiza curquiza changed the title 'internal: decoding failed' error upon deleting documents in v0.21.0rc6 Decoding failure when deleting documents Aug 20, 2021
bors bot added a commit to meilisearch/milli that referenced this issue Aug 23, 2021
317: Fix the facet string docids filterable deletion bug r=Kerollmops a=Kerollmops

Fixes a bug where the deletion of documents was returning a decoding error. But only when the settings are set with filterable attributes.

This bug was introduced in #254 in which we made the engine faster in returning the facet distribution. We changed the way we were storing the inverted index, we were no more storing only documents ids with the original values but also groups identified with integers, depending on the facet level we were using. This is similar to how facet numbers are already stored.

⚠️ As `@curquiza` already said, we must first revert #309 before merging this!

Related to meilisearch/meilisearch#1601.

Co-authored-by: Clément Renault <clement@meilisearch.com>
@curquiza curquiza linked a pull request Aug 23, 2021 that will close this issue
@curquiza
Copy link
Member

Closed by #1605

Bug triage automation moved this from Bugs - severity 1 🔥 to Done Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants