Windows: Threads created by RocksDB are not impersonated
- Dominant language
- C++
- Stars
- 32.1k
- Forks
- 6.9k
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
presumptions:
- the thread which opens a rocksdb is impersonating a user - the process user is a different user
- the process user does not have sufficient access rights for the database directory
rocksdb opens the database with success. Some functions (compacting?) are failing because they try to open files or try to move (rename) files because they run in a background thread. On windows newly created threads are running as the process user (and not as a impersonated user)
This is somewhat inconsistent, because there is no error when opening the database and also when inserting values (sometimes inserts fail - because files needs to be created/moved)
Solution could be that the database instance stores the impersonation (DuplicateTokenEx). Every tasks that starts for that specific database also gets that token and impersonates at the very beginning of execution of the task and reverts after the work is done.
PS: Thank you all for this wonderful piece of software.
Contributor guide
Assessment
This issue has not been assessed yet.