Commit Graph

61 Commits

Author SHA1 Message Date
Aayush Rajasekaran
7903224ae5
Merge pull request #10680 from filecoin-project/steb/blockstore-has-check
feat: badger: add a has check before writing to reduce duplicates
2023-04-26 16:17:16 -04:00
Aayush
5a061e4677 Merge branch 'releases' into asr/merge-release-into-master 2023-04-23 14:58:50 -04:00
Jorropo
fe42d974a2 chore: all: migrate from go-libipfs to boxo
github.com/ipfs/libipfs/blocks was unmigrated to github.com/ipfs/go-block-format due to compatibility issues with the rest of the IPLD stack.
2023-04-18 17:22:18 +02:00
Steven Allen
0cff56a16d feat: badger: add a has check before writing to reduce duplicates 2023-04-17 10:57:41 -07:00
zenground0
d77ac5ddcb Stop swallowing errors 2023-04-10 17:16:13 +02:00
zenground0
0ce9ae4809 Implement yield friendly online GC 2023-04-10 17:16:01 +02:00
Phi-rjan
b240031605
Limit moving gc threads (#10623)
Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>
2023-04-05 11:21:32 -04:00
zenground0
c281d053d2 Limit moving gc threads 2023-04-04 14:07:36 -06:00
Peter Rabbitson
6afa99d0a1 Plumb through a proper Flush() method on all blockstores 2023-03-14 02:30:15 +01:00
zenground0
71b21db0d9 chain prune hot -- hotstore online gc 2023-03-03 11:14:52 -05:00
Jorropo
f572852d06 chore: all: bump go-libipfs to replace go-block-format
Includes changes from:
- https://github.com/ipfs/go-block-format/pull/37
- https://github.com/ipfs/go-libipfs/pull/58
2023-01-26 17:03:18 +01:00
Masih H. Derkani
6f686cae11 Upgrade to go-blockstore 1.2.0 and go-cid 0.2.0
Upgrade required dependencies and fix breaking changes.
2022-06-29 14:55:22 -04:00
Łukasz Magiera
e65fae28de chore: fix imports 2022-06-14 17:00:51 +02:00
Aayush Rajasekaran
dfb65ed89f Plumb contexts through 2021-12-11 17:04:00 -05:00
whyrusleeping
072297e661 WIP: updating to new datastore/blockstore code with contexts 2021-12-09 14:12:25 +02:00
vyzo
5e8b2c7860 make symlink helper freestanding 2021-07-29 08:35:53 +03:00
vyzo
b75ff37448
fix typo
Co-authored-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-07-28 17:11:04 +03:00
vyzo
c65d72fbca fix format specifier 2021-07-28 16:20:25 +03:00
vyzo
fff1c0ae57 improve detection of relative links 2021-07-28 16:15:39 +03:00
vyzo
0740274b7c make relative links when the canonical and new db paths are in the same directory 2021-07-28 11:56:23 +03:00
vyzo
950ded454d code cosmetics: rename variables for better readability and some comments 2021-07-28 11:49:42 +03:00
vyzo
c21c413695 remove db2 to dbNext 2021-07-27 12:06:40 +03:00
vyzo
bb2d99908c make state constants typed 2021-07-27 12:03:26 +03:00
vyzo
b82f953fd5 use the badger streaming interface in doCopy 2021-07-27 11:46:35 +03:00
vyzo
59aebba0d9 use a slab allocator for the copy 2021-07-27 11:35:21 +03:00
vyzo
0baeec0686 remove filter from doCopy; it's not used
it was there to support a potential CopyTo interface; but we'll cross that bridge when we get there.
2021-07-27 11:18:24 +03:00
vyzo
649fc62863 panic if we fail to correctly setup the db paths.
we can't really continue and leave a ticking bomb for the next restart; the user might not see it.
2021-07-27 10:27:16 +03:00
vyzo
d6ace68540 extend test to do a double move and check symlink following 2021-07-27 10:16:50 +03:00
vyzo
cbaffab9dd use EvalSymlinks in deleteDB 2021-07-27 10:08:07 +03:00
vyzo
c03859c1b5 resolve symlinks when constructing the new db path
so that the new path is adjacent to the old path, allowing the user to symlink the db in
a different file system.
2021-07-27 10:05:35 +03:00
vyzo
96c1123c33 use functional options in the BlockstoreGC interface 2021-07-27 09:52:06 +03:00
vyzo
938330e6c3 moveMx is not an RWMutex, just a regular mutex 2021-07-26 15:09:31 +03:00
vyzo
c747f2f1e2 do moving GC if the user asks for it 2021-07-26 15:05:57 +03:00
vyzo
a843665132 add options to BlockstoreGC trait 2021-07-26 15:05:57 +03:00
vyzo
94509968a0 make moveTo a private method 2021-07-26 15:05:20 +03:00
vyzo
5cf6fdf81d don't heap allocate the cond, just set L 2021-07-26 15:04:46 +03:00
vyzo
524564e2cf add some more logging around move 2021-07-26 15:04:46 +03:00
vyzo
f2c7b08be5 follow symbolic links when deleting old dbs 2021-07-26 15:04:46 +03:00
vyzo
608a9f84d2 fix copy: flush discards the transaction 2021-07-26 15:04:46 +03:00
vyzo
4b0b37a4ef fix lint
the great spellchecker strikes again
2021-07-26 15:04:46 +03:00
vyzo
4715b1f436 fix lotus-shed 2021-07-26 15:04:46 +03:00
vyzo
001c04f2dd use pooled slices for the copy 2021-07-26 15:04:46 +03:00
vyzo
b741d61b20 implement BlockstoreMover in badger 2021-07-26 15:04:46 +03:00
vyzo
2cfd73c879 manually compute size when badger is being stupid 2021-07-26 09:46:21 +03:00
vyzo
30e4b405b7 implement BlockstoreSize for badger 2021-07-26 08:43:09 +03:00
vyzo
c93328b036 use the new traits for hotstore gc 2021-07-14 22:59:52 +03:00
vyzo
35180b4761 merge Compact and CollectGarbage in badger 2021-07-14 22:59:52 +03:00
vyzo
909f7039d4 make badger Close-safe 2021-07-09 09:54:12 +03:00
vyzo
08cad30be2 reuse key buffer in badger ForEachKey
cid copies the bytes so it's safe
2021-07-04 18:38:28 +03:00
vyzo
d476a3db2c BlockstoreIterator trait with implementation for badger 2021-07-04 18:38:28 +03:00