isar / isar/hive

Random I/O error

Open
#813 3 comments 8 reactions 0 assignees View on GitHub
problem
Dominant language
Dart
Stars
4.4k
Forks
449
PR merge metrics
No merged PRs in 30d

Description

The test source available here: https://pastebin.com/ijbsrV5F

OS: Win10 latest, hive package is the latest available on pub. Dart (2.14.0) is the latest version from the latest flutter (stable 2.5.0). (sdk: ">=2.14.0 <3.0.0")

The error occurs at a random point in the loop. There seems to be a race condition somewhere in the file handling.

```
cycle: 1654
Unhandled exception:
FileSystemException: Cannot rename file to 'C:\Users\User\Documents\contacts.hive', path = 'C:\Users\User\Documents\contacts.hivec' (OS Error: Access is denied.
, errno = 5)
#0 _File.rename. (dart:io/file_impl.dart:305:9)

#1 StorageBackendVm.compact. (package:hive/src/backend/vm/storage_backend_vm.dart:187:7)

#2 BoxBaseImpl.compact (package:hive/src/box/box_base_impl.dart:151:5)

#3 BoxImpl._writeFrames (package:hive/src/box/box_impl.dart:95:5)

#4 main (package:utils/hive_test.dart:63:7)

Process finished with exit code 255
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.