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

fix(search): cannot batch insert to search db #6646

Merged
merged 1 commit into from Sep 8, 2022

Conversation

andelf
Copy link
Collaborator

@andelf andelf commented Sep 8, 2022

When re-index, Electron main process error:

RangeError: Too many parameter values were provided
    at /Users/..../Repos/logseq/.shadow-cljs/builds/electron/dev/out/cljs-runtime/electron/search.cljs:150:39
    at insert-many (/Users/...../Repos/logseq/static/node_modules/better-sqlite3/lib/methods/transaction.js:65:24)

The incoming blocks-to-add has a nil in coll.

Introduced in #6455

block->index now becomes nil-able. should filter out all nil values.

Caused by diff of:
https://github.com/logseq/logseq/pull/6455/files#diff-e7fd16ab702eff86ec25cb18638b6fe514d4d527d80bba84f9af4918319dfa01R16-R22
image

Copy link
Collaborator

@cnrpman cnrpman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andelf andelf merged commit e196b8e into logseq:master Sep 8, 2022
@andelf andelf deleted the fix/cannot-batch-insert-to-searchdb branch September 8, 2022 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants