Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Absent index file and parse errors handling #63

@kirillt

Description

@kirillt

Using ark-cli:

  1. Create or copy some test folder with data.
  2. Make sure there are no .ark/index file.
  3. Run ark-cli monitor, wait till the index is computed, Ctrl+C.
  4. Check .ark.index.

Expected: the index file exists.
Actual: it is absent.

Example:

[kirill@lenovo test]$ rm .ark/index 
[kirill@lenovo test]$ ../ark-cli monitor
Building index of folder /tmp/test
Build succeeded in 12.901021531s

Updating succeeded in 287.573914ms

Updating succeeded in 283.567582ms

Updating succeeded in 292.411364ms

^C
[kirill@lenovo test]$ ls -lah .ark/index
ls: cannot access '.ark/index': No such file or directory

If you enable debug log, you can see there is an IO error in arklib (absent file).

[kirill@lenovo test]$ RUST_LOG=debug ../ark-cli monitor
Building index of folder /tmp/test
[2024-01-03T15:29:07Z INFO  arklib] Index has not been registered before
[2024-01-03T15:29:07Z INFO  arklib::index] Loading the index from file /tmp/test/.ark/index
[2024-01-03T15:29:07Z WARN  arklib::index] IO error
[2024-01-03T15:29:07Z INFO  arklib::index] Building the index from scratch
[2024-01-03T15:29:07Z DEBUG arklib::index] Discovering all files under path /tmp/test
^C

Apparently, IO errors are not handled in a nice way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions