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

Unexpected characters cause crash #920

Closed
FallingSnow opened this issue Feb 13, 2020 · 4 comments
Closed

Unexpected characters cause crash #920

FallingSnow opened this issue Feb 13, 2020 · 4 comments
Labels

Comments

@FallingSnow
Copy link

FallingSnow commented Feb 13, 2020

I'm trying to do a prefix text match (for auto complete).

The following queries cause the server to crash with the error below:

  • CALL db.idx.fulltext.queryNodes('FERAS', 'ALL%')
  • CALL db.idx.fulltext.queryNodes('FERAS', '.*ALL')
  • CALL db.idx.fulltext.queryNodes('FERAS', '.*ALL.*')

Error:

redis-server: /home/ayrton/.cache/yay/redis-graph-git/src/redis-graph/src/procedures/proc_fulltext_query.c:58: Proc_FulltextQueryNodeInvoke: Assertion `pdata->iter' failed.
redis.service: Main process exited, code=killed, status=6/ABRT
redis.service: Failed with result 'signal'.

Output of module list:
image

@jeffreylovitz
Copy link
Contributor

Hi @FallingSnow ,

Thanks for the report! This crash is a bug; a syntax error should be emitted here. We'll resolve this soon!

Our full-text indexes are backed by RediSearch, and should use its syntax. For prefix matching on the literal prefix "ALL", the query would be:
CALL db.idx.fulltext.queryNodes('FERAS', 'ALL*')

@FallingSnow
Copy link
Author

Thank you, that syntax works.

@FallingSnow
Copy link
Author

CALL db.idx.fulltext.queryNodes('FERAS', 'adoc *') YIELD node AS feras RETURN COUNT(feras) AS count also causes the same crash. I'm sure this is invalid syntax, but this shouldn't cause a crash.

@jeffreylovitz
Copy link
Contributor

You're definitely right! We'll close this issue once the crash has been replaced with a sensible user-facing error, which I'd expect to be early next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants