# Badger

**URL:** https://discuss.dgraph.io/c/issues/badger/37.md

[Latest](https://discuss.dgraph.io/latest.md) · [Categories](https://discuss.dgraph.io/categories.md) · [Tags](https://discuss.dgraph.io/tags.md)

---

## [SURVEY: Who is using Badger?](https://discuss.dgraph.io/t/survey-who-is-using-badger/8673)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 9\
**Last updated:** [June 26, 2022, 3:46pm UTC](https://discuss.dgraph.io/t/survey-who-is-using-badger/8673 "2022-06-26T15:46:21Z")

</div>

Moved from GitHub badger/1352 Posted by jarifibrahim: Hey there :wave:, we’re doing an informal survey to gauge the interest in this project and it would be very helpful if you could answer the following questions- I…

---

## [About the Badger category](https://discuss.dgraph.io/t/about-the-badger-category/8334)

<div class="topic-metadata">

**Author:** [@mrjn](https://discuss.dgraph.io/u/mrjn)\
**Replies:** 0

</div>

Please file any issues related to Badger in this category. If you need general support, use Users \> Badger.

---

## [Panics when opening a corrupted Badger DB](https://discuss.dgraph.io/t/panics-when-opening-a-corrupted-badger-db/14016)

<div class="topic-metadata">

**Author:** [@lukeng](https://discuss.dgraph.io/u/lukeng)\
**Replies:** 9\
**Last updated:** [November 15, 2024, 8:34am UTC](https://discuss.dgraph.io/t/panics-when-opening-a-corrupted-badger-db/14016 "2024-11-15T08:34:00Z")

</div>

What version of Go are you using (go version)? $ go version go version go1.16.2 windows/amd64 What operating system are you using? Windows 10 1903 (OS build 18362.1082) What version of Badger are you using? github.com…

---

## [Block cache might be too small constantly showing](https://discuss.dgraph.io/t/block-cache-might-be-too-small-constantly-showing/19032)

<div class="topic-metadata">

**Author:** [@zooney](https://discuss.dgraph.io/u/zooney)\
**Replies:** 0\
**Last updated:** [November 2, 2023, 11:28am UTC](https://discuss.dgraph.io/t/block-cache-might-be-too-small-constantly-showing/19032 "2023-11-02T11:28:29Z")

</div>

Hi, I keep getting the message on one of my alpha nodes that the block cache might be too small. This started recently after I dropped and rebuilt an alpha node. I am not noticing any explicit performance issues but wan…

---

## [Panic : Slice Range Out Of Bound. InitIndex Crashed](https://discuss.dgraph.io/t/panic-slice-range-out-of-bound-initindex-crashed/18930)

<div class="topic-metadata">

**Author:** [@Akhilesh\_mahajan](https://discuss.dgraph.io/u/Akhilesh_mahajan)\
**Replies:** 0\
**Last updated:** [September 21, 2023, 5:25pm UTC](https://discuss.dgraph.io/t/panic-slice-range-out-of-bound-initindex-crashed/18930 "2023-09-21T17:25:53Z")

</div>

What version of Go are you using (go version)? $ go version 1.20 What operating system are you using? Linux What version of Badger are you using? 4.2.0 Does this issue reproduce with the latest master? Yes Steps to …

---

## [Building go application with jemalloc errors out](https://discuss.dgraph.io/t/building-go-application-with-jemalloc-errors-out/17034)

<div class="topic-metadata">

**Author:** [@Vishal\_Jangid](https://discuss.dgraph.io/u/Vishal_Jangid)\
**Replies:** 5\
**Last updated:** [March 16, 2023, 4:04am UTC](https://discuss.dgraph.io/t/building-go-application-with-jemalloc-errors-out/17034 "2023-03-16T04:04:15Z")

</div>

What version of Go are you using (go version)? $ go version 1.17 What operating system are you using? Rhel 7 What version of Badger are you using? v3.2103.2 Does this issue reproduce with the latest master? yes Step…

---

## [Badger panics after db reaches 1.1T](https://discuss.dgraph.io/t/badger-panics-after-db-reaches-1-1t/16092)

<div class="topic-metadata">

**Author:** [@caevv](https://discuss.dgraph.io/u/caevv)\
**Replies:** 13\
**Last updated:** [February 1, 2023, 9:40pm UTC](https://discuss.dgraph.io/t/badger-panics-after-db-reaches-1-1t/16092 "2023-02-01T21:40:19Z")

</div>

panic: Base level can’t be zero. DB size: $ du -h /data/badger/ 1.1T /data/badger/ Badger settings: badgerOptions := badger.DefaultOptions("/data/badger") badgerDB, err := badger.Open(badgerOptions) Badger version: v…

---

## [Different folder for value log files and LSM tree](https://discuss.dgraph.io/t/different-folder-for-value-log-files-and-lsm-tree/18109)

<div class="topic-metadata">

**Author:** [@caevv](https://discuss.dgraph.io/u/caevv)\
**Replies:** 0\
**Last updated:** [December 16, 2022, 5:21pm UTC](https://discuss.dgraph.io/t/different-folder-for-value-log-files-and-lsm-tree/18109 "2022-12-16T17:21:15Z")

</div>

Is there a way to separate the folder of the value log file and the LSM tree? I use a lot of values with keys only and need fast SSD access to those, but I also have some big files that I want to have in the value log f…

---

## [Failed to open BadgerDB object: file does not exist for table](https://discuss.dgraph.io/t/failed-to-open-badgerdb-object-file-does-not-exist-for-table/17878)

<div class="topic-metadata">

**Author:** [@jared.davis](https://discuss.dgraph.io/u/jared.davis)\
**Replies:** 1\
**Last updated:** [October 17, 2022, 9:05pm UTC](https://discuss.dgraph.io/t/failed-to-open-badgerdb-object-file-does-not-exist-for-table/17878 "2022-10-17T21:05:44Z")

</div>

What version of Go are you using (go version)? go 1.18 What operating system are you using? NAME="Amazon Linux" VERSION="2" ID="amzn" ID\_LIKE="centos rhel fedora" VERSION\_ID="2" PRETTY\_NAME="Amazon Linux 2" ANSI\_COLOR="…

---

## [Badger crashes on full disk](https://discuss.dgraph.io/t/badger-crashes-on-full-disk/13308)

<div class="topic-metadata">

**Author:** [@anya](https://discuss.dgraph.io/u/anya)\
**Replies:** 4\
**Last updated:** [October 6, 2022, 9:32pm UTC](https://discuss.dgraph.io/t/badger-crashes-on-full-disk/13308 "2022-10-06T21:32:47Z")

</div>

What version of Go are you using (go version)? $ go version go version go1.16 linux/amd64 What operating system are you using? Linux kernel 5.11.7 amd64 What version of Badger are you using? v3.2011.1 Does this issue …

---

## [Acess Badger values in FIFO](https://discuss.dgraph.io/t/acess-badger-values-in-fifo/17832)

<div class="topic-metadata">

**Author:** [@Vinayak\_Anil](https://discuss.dgraph.io/u/Vinayak_Anil)\
**Replies:** 0\
**Last updated:** [October 4, 2022, 9:00am UTC](https://discuss.dgraph.io/t/acess-badger-values-in-fifo/17832 "2022-10-04T09:00:29Z")

</div>

Hi, I am using a badger database and I want to retireve my values in the FIFO order. Right now they seem to be stored alphabetically, Can I tweak some defaultOptions to make sure I get them in FIFO fashion?

---

## [Program hangs after ErrNoRewrite](https://discuss.dgraph.io/t/program-hangs-after-errnorewrite/17723)

<div class="topic-metadata">

**Author:** [@giovannizotta](https://discuss.dgraph.io/u/giovannizotta)\
**Replies:** 0\
**Last updated:** [September 3, 2022, 11:14am UTC](https://discuss.dgraph.io/t/program-hangs-after-errnorewrite/17723 "2022-09-03T11:14:11Z")

</div>

What version of Go are you using (go version)? 1.18 What operating system are you using? Linux What version of Badger are you using? v3.2103.2 Does this issue reproduce with the latest master? Not sure, I’m running l…

---

## [Badger - dead lock after ErrTxnTooBig](https://discuss.dgraph.io/t/badger-dead-lock-after-errtxntoobig/17693)

<div class="topic-metadata">

**Author:** [@Zach-Johnson](https://discuss.dgraph.io/u/Zach-Johnson)\
**Replies:** 0\
**Last updated:** [August 25, 2022, 8:38pm UTC](https://discuss.dgraph.io/t/badger-dead-lock-after-errtxntoobig/17693 "2022-08-25T20:38:01Z")

</div>

What version of Go are you using (go version)? $ go version go version go1.19 darwin/amd64 What operating system are you using? macOS Monterey What version of Badger are you using? v3 Does this issue reproduce with t…

---

## [Cannot allocate memory android](https://discuss.dgraph.io/t/cannot-allocate-memory-android/17655)

<div class="topic-metadata">

**Author:** [@akilan\_selvacoumar](https://discuss.dgraph.io/u/akilan_selvacoumar)\
**Replies:** 4\
**Last updated:** [August 16, 2022, 5:45pm UTC](https://discuss.dgraph.io/t/cannot-allocate-memory-android/17655 "2022-08-16T17:45:07Z")

</div>

What version of Go are you using (go version)? go1.18.5 What operating system are you using? Android 11 What version of Badger are you using? v3.2103.2 Does this issue reproduce with the latest master? Yes What Badge…

---

## [Can't increase ValueThreshold](https://discuss.dgraph.io/t/cant-increase-valuethreshold/17569)

<div class="topic-metadata">

**Author:** [@kotyara85](https://discuss.dgraph.io/u/kotyara85)\
**Replies:** 0\
**Last updated:** [July 25, 2022, 12:21am UTC](https://discuss.dgraph.io/t/cant-increase-valuethreshold/17569 "2022-07-25T00:21:34Z")

</div>

What version of Go are you using (go version)? $ go version 1.18 What operating system are you using? macos What version of Badger are you using? v3.2103.2 Does this issue reproduce with the latest master? yes Step…

---

## [Deadlock in Badger V3](https://discuss.dgraph.io/t/deadlock-in-badger-v3/17548)

<div class="topic-metadata">

**Author:** [@ronanh](https://discuss.dgraph.io/u/ronanh)\
**Replies:** 0\
**Last updated:** [July 19, 2022, 9:24pm UTC](https://discuss.dgraph.io/t/deadlock-in-badger-v3/17548 "2022-07-19T21:24:16Z")

</div>

What version of Go are you using (go version)? $ go version 1.18 What operating system are you using? Rhel 7 What version of Badger are you using? v3.2103.2 Does this issue reproduce with the latest master? could no t…

---

## [Concurrent writes?](https://discuss.dgraph.io/t/concurrent-writes/17541)

<div class="topic-metadata">

**Author:** [@kotyara85](https://discuss.dgraph.io/u/kotyara85)\
**Replies:** 0\
**Last updated:** [July 18, 2022, 2:36am UTC](https://discuss.dgraph.io/t/concurrent-writes/17541 "2022-07-18T02:36:09Z")

</div>

Hello everyone, Does badger support tx crud operations while multiple goroutines access it? Hitting this error. I’m using badger.NewTransaction(true) Thanks goroutine 187 \[running\]: runtime.throw({0x16526cc?, 0x1631…

---

## [Reusing Byte Slice in Transaction causes Bugs with Subscriptions](https://discuss.dgraph.io/t/reusing-byte-slice-in-transaction-causes-bugs-with-subscriptions/17204)

<div class="topic-metadata">

**Author:** [@shivanshvij](https://discuss.dgraph.io/u/shivanshvij)\
**Replies:** 1\
**Last updated:** [July 15, 2022, 6:53pm UTC](https://discuss.dgraph.io/t/reusing-byte-slice-in-transaction-causes-bugs-with-subscriptions/17204 "2022-07-15T18:53:51Z")

</div>

What version of Go are you using (go version)? $ go version go version go1.18.1 darwin/arm64 What operating system are you using? MacOS 12.3.1 (21E258) What version of Badger are you using? v3.2103.2 Does this issue r…

---

## [Badgerdb crashing on save](https://discuss.dgraph.io/t/badgerdb-crashing-on-save/17427)

<div class="topic-metadata">

**Author:** [@Ravindra\_Sharma](https://discuss.dgraph.io/u/Ravindra_Sharma)\
**Replies:** 7\
**Last updated:** [July 7, 2022, 11:18am UTC](https://discuss.dgraph.io/t/badgerdb-crashing-on-save/17427 "2022-07-07T11:18:51Z")

</div>

What version of Go are you using (go version)? $ go version 1.18.3 What operating system are you using? Ubuntu What version of Badger are you using? v3 v3.2103.2 Does this issue reproduce with the latest master? yes …

---

## [Encryption algorithm used for TDE does not provide integrity protection](https://discuss.dgraph.io/t/encryption-algorithm-used-for-tde-does-not-provide-integrity-protection/17472)

<div class="topic-metadata">

**Author:** [@tex0l](https://discuss.dgraph.io/u/tex0l)\
**Replies:** 0\
**Last updated:** [June 28, 2022, 4:05pm UTC](https://discuss.dgraph.io/t/encryption-algorithm-used-for-tde-does-not-provide-integrity-protection/17472 "2022-06-28T16:05:02Z")

</div>

The algorithm used for TDE is AES-CTR, which is robust for ensuring confidentiality. However, AES-CTR does not ensure integrity, which means the cipherText could be tampered with, and no one would know. This kind of vu…

---

## [Documentation website is down](https://discuss.dgraph.io/t/documentation-website-is-down/17471)

<div class="topic-metadata">

**Author:** [@tex0l](https://discuss.dgraph.io/u/tex0l)\
**Replies:** 1\
**Last updated:** [June 28, 2022, 3:05pm UTC](https://discuss.dgraph.io/t/documentation-website-is-down/17471 "2022-06-28T15:05:46Z")

</div>

The documentation website seems down: Badgerdb documentation —

---

## [How often should we open and close a db? On each request? Or each time a server comes up and goes down?](https://discuss.dgraph.io/t/how-often-should-we-open-and-close-a-db-on-each-request-or-each-time-a-server-comes-up-and-goes-down/17453)

<div class="topic-metadata">

**Author:** [@harmanbains](https://discuss.dgraph.io/u/harmanbains)\
**Replies:** 0\
**Last updated:** [June 26, 2022, 7:18am UTC](https://discuss.dgraph.io/t/how-often-should-we-open-and-close-a-db-on-each-request-or-each-time-a-server-comes-up-and-goes-down/17453 "2022-06-26T07:18:20Z")

</div>

Sorry if this is the wrong place to post. I’m wondering how often we should call db, err := badger.Open(badger.DefaultOptions("/path/to/db")) and db.Close() Is it something we should do once when the application sta…

---

## [Iterator Item Copy](https://discuss.dgraph.io/t/iterator-item-copy/17447)

<div class="topic-metadata">

**Author:** [@jsimnz](https://discuss.dgraph.io/u/jsimnz)\
**Replies:** 0\
**Last updated:** [June 24, 2022, 6:58am UTC](https://discuss.dgraph.io/t/iterator-item-copy/17447 "2022-06-24T06:58:25Z")

</div>

I have a fork of Badger that implements a Item.Copy() mechanic, where the Item comes from iterator.Next(). At the moment, each item is only valid within a Next() call, as the object is re-used between iterations. Howev…

---

## [Modify Badger files on disk in another process](https://discuss.dgraph.io/t/modify-badger-files-on-disk-in-another-process/17364)

<div class="topic-metadata">

**Author:** [@danthegoodman1](https://discuss.dgraph.io/u/danthegoodman1)\
**Replies:** 1\
**Last updated:** [May 29, 2022, 8:22pm UTC](https://discuss.dgraph.io/t/modify-badger-files-on-disk-in-another-process/17364 "2022-05-29T20:22:36Z")

</div>

I am looking to build a tool that will backup a badger DB to object storage, and then read replica instances will pull down those file changes. Will badger be compliant with the file changes under the hood since they ar…

---

## [When build with -buildmode=plugin, go complains about an asm error](https://discuss.dgraph.io/t/when-build-with-buildmode-plugin-go-complains-about-an-asm-error/16341)

<div class="topic-metadata">

**Author:** [@siddharthlatest](https://discuss.dgraph.io/u/siddharthlatest)\
**Replies:** 3\
**Last updated:** [May 22, 2022, 7:25pm UTC](https://discuss.dgraph.io/t/when-build-with-buildmode-plugin-go-complains-about-an-asm-error/16341 "2022-05-22T19:25:21Z")

</div>

What version of Go are you using (go version)? go1.17.5 What operating system are you using? Mac OS 12.1 (Intel) What version of Badger are you using? v3.2103.2 Does this issue reproduce with the latest master? Yes. S…

---

## [Badgerdb manifest corruption issue \_solution\_](https://discuss.dgraph.io/t/badgerdb-manifest-corruption-issue-solution/15915)

<div class="topic-metadata">

**Author:** [@iluminae](https://discuss.dgraph.io/u/iluminae)\
**Replies:** 11\
**Last updated:** [May 10, 2022, 10:34am UTC](https://discuss.dgraph.io/t/badgerdb-manifest-corruption-issue-solution/15915 "2022-05-10T10:34:20Z")

</div>

What version of Go are you using (go version)? go version go1.15.14 linux/amd64 What operating system are you using? linux What version of Badger are you using? 7677fcb1e0c2 (the version dgraph v21.03.2 uses) → master …

---

## [GC may not work in some cases](https://discuss.dgraph.io/t/gc-may-not-work-in-some-cases/17197)

<div class="topic-metadata">

**Author:** [@requilence](https://discuss.dgraph.io/u/requilence)\
**Replies:** 2\
**Last updated:** [April 26, 2022, 9:52am UTC](https://discuss.dgraph.io/t/gc-may-not-work-in-some-cases/17197 "2022-04-26T09:52:57Z")

</div>

We are using Badger as a built-in DB on desktop and mobile devices. Before v2.0, GC was working not perfectly(because of random sampling) but most of the time it has acceptable results. But since badger 2.0 GC mostly not…

---

## [\[badger v3\] GC doesn't consider value log growth](https://discuss.dgraph.io/t/badger-v3-gc-doesnt-consider-value-log-growth/15693)

<div class="topic-metadata">

**Author:** [@jkuki](https://discuss.dgraph.io/u/jkuki)\
**Replies:** 1\
**Last updated:** [April 26, 2022, 9:31am UTC](https://discuss.dgraph.io/t/badger-v3-gc-doesnt-consider-value-log-growth/15693 "2022-04-26T09:31:49Z")

</div>

What version of Go are you using (go version)? $ go version 1.16 What operating system are you using? linux/windows What version of Badger are you using? v3 Does this issue reproduce with the latest master? yes Steps…

---

## [CRASH: WARNING: While running doCompact: while running compactions for](https://discuss.dgraph.io/t/crash-warning-while-running-docompact-while-running-compactions-for/17173)

<div class="topic-metadata">

**Author:** [@rsharma](https://discuss.dgraph.io/u/rsharma)\
**Replies:** 0\
**Last updated:** [April 16, 2022, 4:50pm UTC](https://discuss.dgraph.io/t/crash-warning-while-running-docompact-while-running-compactions-for/17173 "2022-04-16T16:50:42Z")

</div>

DB Crashing with below messages: WARNING: \[Compactor: 0\] LOG Compact FAILED with error: while running compactions for: {span:0xc0001b2900 compactorId:0 t:{baseLevel:4 targetSz:\[0 10485760 10485760 10485760 35320113 3532…

---

## [Lost power killed db v3.2103.0](https://discuss.dgraph.io/t/lost-power-killed-db-v3-2103-0/14705)

<div class="topic-metadata">

**Author:** [@Darrell\_Gallion](https://discuss.dgraph.io/u/Darrell_Gallion)\
**Replies:** 3\
**Last updated:** [April 7, 2022, 5:31pm UTC](https://discuss.dgraph.io/t/lost-power-killed-db-v3-2103-0/14705 "2022-04-07T17:31:38Z")

</div>

Power loss killed two badger databases running in separate applications. Testing with Ctrl-C also killed one. Then downgraded to v3.2011.1 and the one destroyed with Ctrl-C became functional. Can’t include traceback. …

[Next page](https://discuss.dgraph.io/c/issues/badger/37.md?page=1)
