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

Internal error when run edit function on movies documents in v1.10.2 #4956

Closed
Ja7ad opened this issue Sep 25, 2024 · 2 comments · Fixed by #4960
Closed

Internal error when run edit function on movies documents in v1.10.2 #4956

Ja7ad opened this issue Sep 25, 2024 · 2 comments · Fixed by #4960
Labels
bug Something isn't working as expected experimental feature Related to an experimental feature indexing v1.11.0 PRs/issues solved in v1.11.0 released on 2024-10-28
Milestone

Comments

@Ja7ad
Copy link

Ja7ad commented Sep 25, 2024

Describe the bug
Base on this notion guide I call edit documents by function and got internal error.

curl http://localhost:7700/indexes/movies/documents/edit \
  -H 'content-type: application/json' \
  -d '{
    "filter": "id > 3000",
    "function": "doc.title = `✨ ${doc.title.to_upper()} ✨`"
  }'

Expected behavior

Server log:

2024-09-25T07:11:29.563769Z ERROR meilisearch: info=panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/rhai-1.19.0/src/engine.rs:347:58: called `Option::unwrap()` on a `None` value
2024-09-25T07:11:29.634669Z ERROR meilisearch: info=panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/rhai-1.19.0/src/engine.rs:347:58: called `Option::unwrap()` on a `None` value
2024-09-25T07:11:29.766880Z ERROR meilisearch: info=panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-par-bridge-0.1.0/src/lib.rs:47:5: a scoped thread panicked

Task details

 {
            "uid": 2,
            "indexUid": "movies",
            "status": "failed",
            "type": "documentEdition",
            "canceledBy": null,
            "details": {
                "editedDocuments": 0,
                "deletedDocuments": null,
                "originalFilter": "\"id > 3000\"",
                "context": null,
                "function": "doc.title = `✨ ${doc.title.to_upper()} ✨`"
            },
            "error": {
                "message": "An unexpected crash occurred when processing the task.",
                "code": "internal",
                "type": "internal",
                "link": "https://docs.meilisearch.com/errors#internal"
            },
            "duration": "PT0.391994763S",
            "enqueuedAt": "2024-09-25T07:11:29.371295421Z",
            "startedAt": "2024-09-25T07:11:29.380739658Z",
            "finishedAt": "2024-09-25T07:11:29.772734421Z"
        }

Meilisearch version:
v1.10.2

@irevoire
Copy link
Member

Hey @Ja7ad, the bug seems to be fixed.
I’ll integrate the fix into the next rc. It would be awesome if you could try it out once it’s released.

Thanks for finding and reporting the issue 🚀

@irevoire irevoire added this to the v1.11.0 milestone Sep 26, 2024
@irevoire irevoire added bug Something isn't working as expected indexing experimental feature Related to an experimental feature labels Sep 26, 2024
@irevoire irevoire mentioned this issue Sep 26, 2024
meili-bors bot added a commit that referenced this issue Sep 26, 2024
4960: Update rhai r=dureuill a=irevoire

# Pull Request

## Related issue
Fixes #4956

A fix has been implemented in rhaiscript/rhai#916

## What does this PR do?
- Use the latest version of rhai containing the fix

Co-authored-by: Tamo <tamo@meilisearch.com>
@curquiza
Copy link
Member

curquiza commented Oct 3, 2024

Closed by #4960

@curquiza curquiza closed this as completed Oct 3, 2024
@meili-bot meili-bot added the v1.11.0 PRs/issues solved in v1.11.0 released on 2024-10-28 label Nov 6, 2024
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 experimental feature Related to an experimental feature indexing v1.11.0 PRs/issues solved in v1.11.0 released on 2024-10-28
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants