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

Absent index file and parse errors handling #63

Open
kirillt opened this issue Jan 3, 2024 · 0 comments
Open

Absent index file and parse errors handling #63

kirillt opened this issue Jan 3, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@kirillt
Copy link
Member

kirillt commented Jan 3, 2024

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.

@kirillt kirillt added bug Something isn't working good first issue Good for newcomers labels Jan 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant