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: Continue Indexing results in "OS error 5" on Windows #2328

Closed
dominiccooney opened this issue Dec 13, 2023 · 1 comment · Fixed by #2359
Closed

bug: Continue Indexing results in "OS error 5" on Windows #2328

dominiccooney opened this issue Dec 13, 2023 · 1 comment · Fixed by #2359
Assignees
Labels
bug Something isn't working clients/vscode

Comments

@dominiccooney
Copy link
Contributor

Version

Main f7cb9e5

Describe the bug

This affects users on Windows using local embeddings who encountered an error while creating the index. It prevents them from finishing the indexing process, but they can use the partially completed index for queries.

Repro steps:

  1. Open a repo that doesn't have embeddings and start a chat.
  2. In the enhanced context selector, enable embeddings.
  3. Kill the cody-engine process, hanging the embeddings indexing process and leaving a half-completed index.
  4. Reload the window and start a chat. The status bar item will appear warning you the index is incomplete.
  5. Click, then select Continue Indexing.

An "os error 5" will result.

Expected behavior

Expected behavior: Indexing should continue.

Actual behavior: "os error 5" and repeated attempts to continue indexing say the index cannot be found.

Additional context

This bug is specific to Windows. cody-engine dropping the old index isn't fast/coordinated enough to prevent a sharing violation.

cody-engine drops the loaded index before trying to resume indexing it, but this should be better coordinated. The index file can be opened in a sharing mode in the first instance and reopened in exclusive mode to update it.

@dominiccooney dominiccooney added bug Something isn't working clients/vscode labels Dec 13, 2023
@dominiccooney dominiccooney self-assigned this Dec 13, 2023
@dominiccooney dominiccooney reopened this Dec 14, 2023
@dominiccooney
Copy link
Contributor Author

Whoops, let me reopen this, we need to also roll the cody-engine version to pick up the fix.

dominiccooney added a commit that referenced this issue Dec 14, 2023
Fixes #2328.

## Test plan

CI.

The "os error 5" issue specifically is covered by tests upstream.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working clients/vscode
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant