jonasplaum commented on issue #5909:
URL: https://github.com/apache/couchdb/issues/5909#issuecomment-4020003484
It's most likely not a good idea to keep the files on windows. If possible,
you should keep the files inside WSL to make sure that file operations work as
expected in POSIX / Linux.
Before compaction:
```
root@cd476862bf19:/# lsof -p 7 | grep shards
beam.smp 7 couchdb 27u REG 0,63 12480
1125899907347446
/opt/couchdb/data/shards/00000000-7fffffff/_users.1773001834.couch
beam.smp 7 couchdb 29u REG 0,63 8346
1125899907347447
/opt/couchdb/data/shards/80000000-ffffffff/_users.1773001834.couch
beam.smp 7 couchdb 36u REG 0,63 206168265
2533274790900723
/opt/couchdb/data/shards/00000000-7fffffff/test-db.1773001837.couch
beam.smp 7 couchdb 37u REG 0,63 16541
7881299348271625
/opt/couchdb/data/shards/80000000-ffffffff/test-db.1773001837.couch
```
While compaction is running:
```
root@cd476862bf19:/# lsof -p 7 | grep shards
beam.smp 7 couchdb 27u REG 0,63 12480
1125899907347446
/opt/couchdb/data/shards/00000000-7fffffff/_users.1773001834.couch
beam.smp 7 couchdb 29u REG 0,63 8346
1125899907347447
/opt/couchdb/data/shards/80000000-ffffffff/_users.1773001834.couch
beam.smp 7 couchdb 36u REG 0,63 206168265
2533274790900723
/opt/couchdb/data/shards/00000000-7fffffff/test-db.1773001837.couch
beam.smp 7 couchdb 38u REG 0,63 52323902
3377699721032703
/opt/couchdb/data/shards/00000000-7fffffff/test-db.1773001837.couch.compact.data
beam.smp 7 couchdb 39u REG 0,63 165
2533274790900741
/opt/couchdb/data/shards/00000000-7fffffff/test-db.1773001837.couch.compact.meta
beam.smp 7 couchdb 40u REG 0,63 16541
16325548649388895
/opt/couchdb/data/shards/80000000-ffffffff/test-db.1773001837.couch
```
After the compaction:
```
root@cd476862bf19:/# lsof -p 7 | grep shards
beam.smp 7 couchdb 27u REG 0,63 12480
1125899907347446
/opt/couchdb/data/shards/00000000-7fffffff/_users.1773001834.couch
beam.smp 7 couchdb 29u REG 0,63 8346
1125899907347447
/opt/couchdb/data/shards/80000000-ffffffff/_users.1773001834.couch
beam.smp 7 couchdb 38u unknown
/opt/couchdb/data/shards/00000000-7fffffff/test-db.1773001837.couch (stat:
No such file or directory)
beam.smp 7 couchdb 40u REG 0,63 16541
16325548649388895
/opt/couchdb/data/shards/80000000-ffffffff/test-db.1773001837.couch
```
The file handle for the compacted shard is broken. After restarting CouchDB
(and after reopening the db), the database is available again and compacted
successfully. This shows that the swap does not work because of non-atomic
filesystem operations under Windows / NTFS.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]