23 Commits
Author SHA1 Message Date
Hanzo AI ab37e5f078 feat: reset module path to luxfi/zapdb v1.0.0
Removed /v4 suffix from module path and all internal imports.
Go module is now github.com/luxfi/zapdb (no major version suffix).
Import as: import "github.com/luxfi/zapdb"

No code changes — only module path and import rewrite.
2026-04-11 00:01:08 -07:00
Zach Kelling ebeadbd0a2 Rebrand badger to zapdb
- Rename module from github.com/dgraph-io/badger/v4 to github.com/luxfi/zapdb/v4
- Update all internal imports to use new module path
- Preserve all ZAP enhancements from badger fork
2026-02-08 14:14:21 -08:00
Matthew McNeelyandGitHub 56b2d31d75 chore: update README.md with correct links and badges (#2239)
**Description**

Updated links

Closes #2238
2025-12-10 22:11:18 +00:00
Alex ZaytsevandGitHub f7ad3f02d8 chore(deps): remove dependency on github.com/pkg/errors (#2184) 2025-04-07 22:02:35 +05:30
Ryan Fox-TylerandGitHub 94498ea84c chore: align repo conventions (#2158) 2025-02-05 17:00:32 -05:00
Aman MangalandGitHub 3220a35a10 retract v4.3.0 due to #2121 and #2113, upgrade to Go v1.23, use ristretto v2 (#2122)
Fixes #2121
2024-10-25 22:03:34 +05:30
Harshil GoelandGitHub a0b1d43b78 [BREAKING] feat(metrics): fix and update metrics in badger (#1948)
Our current metrics are outdated, and some of them are not being invoked
at all right now. Added new metrics, and fixed old ones. Note that this PR
removes all the old metrics (because of the prefix change) and introduces
new improved metrics.
2023-07-18 11:24:55 +05:30
Joshua GoldsteinandGitHub ad428b8122 chore(ci): update changelog + import paths for v4 (#1886)
Changelog should reflect that we are switching to SemVer. This requires
moving to a new major version. We also update all import paths in
Badger.
2023-02-27 22:21:42 +00:00
Aman MangalandGitHub 4a93c43eac chore(linter): enable unconvert linter (#1881) 2023-02-22 23:32:29 +05:30
Aman MangalandGitHub 18972258dc chore: use atomic types instead (#1878) 2023-02-22 23:06:03 +05:30
Aman MangalandGitHub bbd4b3f95c chore: remove dependency on io/ioutil (#1879)
we still have a couple of places where we are using io/ioutil.
2023-02-21 08:06:07 +05:30
Aman MangalandGitHub 14b0d32c59 chores(linter): enable rest of the linters (#1871) 2023-02-17 18:33:17 +05:30
Aman MangalandGitHub f83f87e90b fix order of imports (#1869) 2023-02-15 02:12:59 +05:30
aman bansalandGitHub 20f4ad7078 chore(badger): making metrics configuration with options (#1674)
* making metrics configuration with options
2021-03-03 12:45:38 +05:30
Naman JainandGitHub 2d60e3c09b fix: update ristretto and use filepath (#1649)
* update ristretto
* use filepath instead of path
2021-01-22 14:04:29 +05:30
Naman JainandGitHub 6add7b479f chore: remove unused argument and obsolete FileLoadingMode option (#1640)
Removes unused argument and obsolete FileLoadingMode option.
2021-01-14 11:31:03 +05:30
aman bansalandGitHub dbca3723b3 changing badger module path to v3 (#1636)
* changing badger module path to v3

* running go mod tidy

* updating metric keys + proto package
2021-01-13 10:55:37 +05:30
Manish R JainandGitHub fc093eeb90 Small improvements (#1598)
Decrease the size of DISCARD file and WAL for Memtables.
2020-11-12 15:05:11 -08:00
Naman JainandGitHub f3cdccd935 fix(readonly): fix the file opening mode (#1592) 2020-11-12 14:04:17 +05:30
Ibrahim JarifandGitHub 805b623a6d fix(tests): Writebatch, Stream, Vlog tests (#1577)
This PR fixes the following issues/tests
 - Deadlock in writes batch - Use atomic to set value of `writebatch.error`
 - Vlog Truncate test - Fix issues with empty memtables
 - Test options - Set memtable size.
 - Compaction tests - Acquire lock before updating level tables
 - Vlog Write - Truncate the file size if the transaction cannot fit in vlog size
 - TestPersistLFDiscardStats - Set numLevelZeroTables=1 to force compaction.

This PR also fixes the failing bank test by adding an index cache to the bank test.
2020-11-02 13:31:52 +05:30
Ahsan BarkatiandGitHub f6188d42e6 Export functions from Key Registry (#1561)
Export some of the functions from key registry which are to be used
by dgraph for the encryption of raftwal.
2020-10-13 14:36:01 +05:30
Manish R Jain 50287f6cbd Fix(value log GC): Fix a bug which caused value log files to not be GCed. 2020-10-08 20:15:56 -07:00
Manish R JainandGitHub 4ed8fbdc02 [BREAKING]: Change how Badger handles WAL (#1555)
This PR significantly improves Badger's disk usage behavior.

Breaking: This PR increases the magic version from 7 to 8. So, no older Badger directories would work with this change.

With this PR, we no longer use value log as write-ahead log. Instead, each MemTable has its own WAL. Value logs now only write values which are greater than ValueThreshold, while MemTable WAL only writes smaller values and value pointers.

On a crash and restart, the MemTable WALs are replayed to apply updates to Skiplist. When MemTables are flushed to L0, the corresponding WALs are deleted.

This PR makes big changes to how value log GC works:
- Discard stats are now stored in a separate file, instead of within the LSM tree.
- GC only picks up value logs based off discard stats.
- GC no longer does sampling, it uses discard stats to inform when a value log needs to be GCed.
- Value log would now no longer grow indefinitely, because of the shift to MemTable WAL.
- Removed the `badger gc` tool.
- Value Log Head pointer tracking is removed.
- Only the last value log file is replayed on every start, and truncated as necessary.

This PR also makes a bunch of other changes:
- Removes ValueLogLoadingMode (always uses mmap now).
- Removes TableLoadingMode (always uses mmap now).
- Removes Truncate option.
- Removes KeepL0InMemory option.
2020-10-06 18:41:41 -07:00