Exception from compact method
- Dominant language
- Dart
- Stars
- 4.4k
- Forks
- 449
- PR merge metrics
- No merged PRs in 30d
Description
I was running my code to gather some statistics (it wasn't connected with hive) for like an hour and I got this exception which ruined all process:
`Unhandled exception:
FileSystemException: Cannot rename file to 'C:\Users\faufd\Desktop\sh\cpp_native\example\uploadbox-v1.0.hive', path = 'C:\Users\faufd\Desktop\sh\cpp_native\example\uploadbox-v1.0.hivec' (OS Error: Access 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:188: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)
`
I have 2 files in this directory `uploadbox-v1.0.hive` and `uploadbox-v1.0.hivec`, `compact()` method was called on background by hive.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with StorageBackendVm.compact at package:hive/src/backend/vm/storage_backend_vm.dart:188, then follow the calls from BoxBaseImpl.compact and BoxImpl._writeFrames named in the stack trace. Reproduce the Windows rename failure involving the .hive and .hivec files, and establish expected compact behavior when the rename raises access denied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100