# \#badger

**URL:** https://discuss.dgraph.io/tag/badger/85.md

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

---

## [How to check if a folder is a database folder and if it's already open?](https://discuss.dgraph.io/t/how-to-check-if-a-folder-is-a-database-folder-and-if-its-already-open/19364)

<div class="topic-metadata">

**Author:** [@willie68](https://discuss.dgraph.io/u/willie68)\
**Replies:** 5\
**Last updated:** [July 30, 2024, 4:17pm UTC](https://discuss.dgraph.io/t/how-to-check-if-a-folder-is-a-database-folder-and-if-its-already-open/19364 "2024-07-30T16:17:16Z")

</div>

As already ask in the Headline: How can i check, if an folder contains a valid badgerdb, and how can i check if it’s already open? Background: I am programming a microservice and it uses badgerdb to store various info…

---

## [Compare and Set with Badger?](https://discuss.dgraph.io/t/compare-and-set-with-badger/19318)

<div class="topic-metadata">

**Author:** [@Jay1](https://discuss.dgraph.io/u/Jay1)\
**Replies:** 0\
**Last updated:** [May 15, 2024, 11:24am UTC](https://discuss.dgraph.io/t/compare-and-set-with-badger/19318 "2024-05-15T11:24:11Z")

</div>

I’m writing to ask whether there is a “compare and set” operator in Badger, or if there is an idiomatic way to implement one. Consider the following: txn := db.NewTransaction(true) txn.Set(\[\]byte("a"), \[\]byte("b")) …

---

## [Purge Badger Instance](https://discuss.dgraph.io/t/purge-badger-instance/19294)

<div class="topic-metadata">

**Author:** [@Sourav\_Agarwal](https://discuss.dgraph.io/u/Sourav_Agarwal)\
**Replies:** 0\
**Last updated:** [April 22, 2024, 7:24pm UTC](https://discuss.dgraph.io/t/purge-badger-instance/19294 "2024-04-22T19:24:10Z")

</div>

Is there a way to auto purge the badger DB instance after certain TTL?

---

## [Start from scratch without exporting to RDF(Badger)](https://discuss.dgraph.io/t/start-from-scratch-without-exporting-to-rdf-badger/18470)

<div class="topic-metadata">

**Author:** [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Replies:** 1\
**Last updated:** [March 18, 2024, 1:10am UTC](https://discuss.dgraph.io/t/start-from-scratch-without-exporting-to-rdf-badger/18470 "2024-03-18T01:10:40Z")

</div>

Stream data using Badger BEFORE ANY ATTEMPT. PLEASE BACKUP YOUR FILES. Download Badger binary and put it in /usr/local/bin/badger wget https://github.com/dgraph-io/dgraph/releases/download/v23.0.0/badger-linux-amd64…

---

## [Discussion: BadgerDB should offer arbitrarily sized, atomic transactions](https://discuss.dgraph.io/t/discussion-badgerdb-should-offer-arbitrarily-sized-atomic-transactions/8736)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 6\
**Last updated:** [December 9, 2023, 12:19pm UTC](https://discuss.dgraph.io/t/discussion-badgerdb-should-offer-arbitrarily-sized-atomic-transactions/8736 "2023-12-09T12:19:45Z")

</div>

Moved from GitHub badger/1325 Posted by mvanderkroon: Observation The current BadgerDB implementation keeps in-flight transactions in memory until txn.Commit() is called. If the amount of operations exceeds a predeterm…

---

## [Do somebody response about WAL problem? https://github.com/dgraph-io/badger/issues/2015](https://discuss.dgraph.io/t/do-somebody-response-about-wal-problem-https-github-com-dgraph-io-badger-issues-2015/18977)

<div class="topic-metadata">

**Author:** [@acekingke](https://discuss.dgraph.io/u/acekingke)\
**Replies:** 1\
**Last updated:** [October 10, 2023, 6:19pm UTC](https://discuss.dgraph.io/t/do-somebody-response-about-wal-problem-https-github-com-dgraph-io-badger-issues-2015/18977 "2023-10-10T18:19:59Z")

</div>

\[QUESTION\]: Why badger use WAL? · Issue #2015 · dgraph-io/badger · GitHub,

---

## [Badger Error: initIndex Crash](https://discuss.dgraph.io/t/badger-error-initindex-crash/18957)

<div class="topic-metadata">

**Author:** [@Akhilesh\_mahajan](https://discuss.dgraph.io/u/Akhilesh_mahajan)\
**Replies:** 0\
**Last updated:** [October 3, 2023, 5:58am UTC](https://discuss.dgraph.io/t/badger-error-initindex-crash/18957 "2023-10-03T05:58:06Z")

</div>

Hi team, Continuously facing these 3 errors while running badger. What will be the solution to this? Error 1 badger 2023/09/21 12:38:37 ERROR: Got error: While opening memtable: /data/dedupe/data/table\_50/Pentagram/00…

---

## [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 …

---

## [Badger in-memory best practice](https://discuss.dgraph.io/t/badger-in-memory-best-practice/18818)

<div class="topic-metadata">

**Author:** [@a5r0n](https://discuss.dgraph.io/u/a5r0n)\
**Replies:** 0\
**Last updated:** [July 31, 2023, 11:42am UTC](https://discuss.dgraph.io/t/badger-in-memory-best-practice/18818 "2023-07-31T11:42:13Z")

</div>

What are the best practice options for in-memory db? right now i’m using something like that: opts := badger.DefaultOptions("").WithInMemory(true).WithCompression(options.None).WithMetricsEnabled(false).WithBlockCacheS…

---

## [Badger LSMT options on huge dataset](https://discuss.dgraph.io/t/badger-lsmt-options-on-huge-dataset/18607)

<div class="topic-metadata">

**Author:** [@alexeevaa](https://discuss.dgraph.io/u/alexeevaa)\
**Replies:** 0\
**Last updated:** [May 2, 2023, 7:23pm UTC](https://discuss.dgraph.io/t/badger-lsmt-options-on-huge-dataset/18607 "2023-05-02T19:23:26Z")

</div>

I have a self-hosted cluster with 2 shards, 3 replicas each. Dgraph version is 22.02. It is patched (made rather important fixes regarding export, which after a few month still can’t move past ristretto pull requests …

---

## [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…

---

## [Attend hack.summit() for free](https://discuss.dgraph.io/t/attend-hack-summit-for-free/18356)

<div class="topic-metadata">

**Author:** [@akon](https://discuss.dgraph.io/u/akon)\
**Replies:** 0\
**Last updated:** [March 3, 2023, 9:00pm UTC](https://discuss.dgraph.io/t/attend-hack-summit-for-free/18356 "2023-03-03T21:00:13Z")

</div>

Hi DGraph Community, You can attend hack.summit() for free. Come join us at hack.summit() — a virtual conference where you can learn about blockchain concepts. You can attend from anywhere, and the event is happening M…

---

## [Badger Release v4.0.1 is now Generally Available](https://discuss.dgraph.io/t/badger-release-v4-0-1-is-now-generally-available/18344)

<div class="topic-metadata">

**Author:** [@akon](https://discuss.dgraph.io/u/akon)\
**Replies:** 0\
**Last updated:** [March 1, 2023, 11:45pm UTC](https://discuss.dgraph.io/t/badger-release-v4-0-1-is-now-generally-available/18344 "2023-03-01T23:45:06Z")

</div>

Hi Dgraph Community, We are pleased to announce that a new release of Badger v4.0.1 is now available. We would like to thank the community contributions and the Dgraph team for their efforts to make this release happen. …

---

## [Include fix for manifest corruption in next release](https://discuss.dgraph.io/t/include-fix-for-manifest-corruption-in-next-release/17749)

<div class="topic-metadata">

**Author:** [@vnium](https://discuss.dgraph.io/u/vnium)\
**Replies:** 1\
**Last updated:** [December 19, 2022, 9:55pm UTC](https://discuss.dgraph.io/t/include-fix-for-manifest-corruption-in-next-release/17749 "2022-12-19T21:55:58Z")

</div>

The main branch of Dgraph currently targets v3.2103.1 of Badger which does not have this manifest corruption fix included. A corrupted manifest results in data loss. Please consider releasing a new version of Badger wit…

---

## [How to implement a reverse roaring bitmap iterator? (sroar.Bitmap.NewReverseIterator went away?)](https://discuss.dgraph.io/t/how-to-implement-a-reverse-roaring-bitmap-iterator-sroar-bitmap-newreverseiterator-went-away/17901)

<div class="topic-metadata">

**Author:** [@decentral1se](https://discuss.dgraph.io/u/decentral1se)\
**Replies:** 1\
**Last updated:** [October 26, 2022, 3:32pm UTC](https://discuss.dgraph.io/t/how-to-implement-a-reverse-roaring-bitmap-iterator-sroar-bitmap-newreverseiterator-went-away/17901 "2022-10-26T15:32:52Z")

</div>

Hey :wave: Just to increase visibility, I commented on opt(iterator): Optimise the iterator and introduce range iterators by ahsanbarkati · Pull Request #19 · dgraph-io/sroar · GitHub but perhaps opening it out on the f…

---

## [Can I seek database entries based off a particular index?](https://discuss.dgraph.io/t/can-i-seek-database-entries-based-off-a-particular-index/17831)

<div class="topic-metadata">

**Author:** [@Vinayak\_Anil](https://discuss.dgraph.io/u/Vinayak_Anil)\
**Replies:** 0\
**Last updated:** [October 4, 2022, 8:21am UTC](https://discuss.dgraph.io/t/can-i-seek-database-entries-based-off-a-particular-index/17831 "2022-10-04T08:21:25Z")

</div>

For example I have a Badger db with 5 entries Key | Value Vin | 2 Tim | 3 Jim | 4 Jon | 1 Is there a way to query the database in such a way that I skip the first 2 entries. I am certain that I can use the seek f…

---

## [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…

---

## [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…

---

## [Provide simple option for limiting total memory usage](https://discuss.dgraph.io/t/provide-simple-option-for-limiting-total-memory-usage/8730)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 19\
**Last updated:** [May 1, 2022, 4:55pm UTC](https://discuss.dgraph.io/t/provide-simple-option-for-limiting-total-memory-usage/8730 "2022-05-01T16:55:02Z")

</div>

Moved from GitHub badger/1268 Posted by gonzojive: What version of Go are you using (go version)? $ go version go version go1.14 linux/amd64 What version of Badger are you using? v1.6.0 Does this issue reproduce wit…

---

## [Support modern encryption](https://discuss.dgraph.io/t/support-modern-encryption/8728)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 6\
**Last updated:** [January 5, 2022, 10:20am UTC](https://discuss.dgraph.io/t/support-modern-encryption/8728 "2022-01-05T10:20:19Z")

</div>

Moved from GitHub badger/1194 Posted by skerkour: What version of Go are you using (go version)? $ go version go1.13.5 What version of Badger are you using? 2.0.1 Does this issue reproduce with the latest master? ye…

---

## [Use pure Go zstd implementation](https://discuss.dgraph.io/t/use-pure-go-zstd-implementation/8670)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 24\
**Last updated:** [December 23, 2021, 5:25pm UTC](https://discuss.dgraph.io/t/use-pure-go-zstd-implementation/8670 "2021-12-23T17:25:15Z")

</div>

Moved from GitHub badger/1162 Posted by narqo: What version of Go are you using (go version)? $ go version go version go1.13.4 darwin/amd64 What version of Badger are you using? latest master Does this issue reproduc…

---

## [Badger: Optimize bloomfilter parameters](https://discuss.dgraph.io/t/badger-optimize-bloomfilter-parameters/16285)

<div class="topic-metadata">

**Author:** [@neilchennn](https://discuss.dgraph.io/u/neilchennn)\
**Replies:** 0\
**Last updated:** [December 10, 2021, 9:21am UTC](https://discuss.dgraph.io/t/badger-optimize-bloomfilter-parameters/16285 "2021-12-10T09:21:00Z")

</div>

According to the formula shown in the WIKI：https://en.wikipedia.org/wiki/Bloom\_filter#Optimal\_number\_of\_hash\_functions， number of hash functions k is , and m is bitsPerKey so the calculation of bitsPerKey in badger …

---

## [Compaction uses a lot of memory and is frequent](https://discuss.dgraph.io/t/compaction-uses-a-lot-of-memory-and-is-frequent/15903)

<div class="topic-metadata">

**Author:** [@Leo\_Chen](https://discuss.dgraph.io/u/Leo_Chen)\
**Replies:** 3\
**Last updated:** [November 7, 2021, 9:19am UTC](https://discuss.dgraph.io/t/compaction-uses-a-lot-of-memory-and-is-frequent/15903 "2021-11-07T09:19:01Z")

</div>

What version of Go are you using (go version)? $ go version go version go1.17 linux/amd64 What operating system are you using? linux/amd64 What version of Badger are you using? badgerv3 Does this issue reproduce with …

---

## [Badger FIFO Mode](https://discuss.dgraph.io/t/badger-fifo-mode/15520)

<div class="topic-metadata">

**Author:** [@joriwils](https://discuss.dgraph.io/u/joriwils)\
**Replies:** 2\
**Last updated:** [October 22, 2021, 6:41pm UTC](https://discuss.dgraph.io/t/badger-fifo-mode/15520 "2021-10-22T18:41:31Z")

</div>

Is there a FIFO mode in Badger? That is the ability to a) do not do compactions b) client can directly read the oldest SST c) delete it when done?

---

## [List of papers studied when designing Badger](https://discuss.dgraph.io/t/list-of-papers-studied-when-designing-badger/14283)

<div class="topic-metadata">

**Author:** [@eugaia](https://discuss.dgraph.io/u/eugaia)\
**Replies:** 2\
**Last updated:** [August 26, 2021, 10:44am UTC](https://discuss.dgraph.io/t/list-of-papers-studied-when-designing-badger/14283 "2021-08-26T10:44:44Z")

</div>

In this blog post @mrjn mentions that while developing Badger, you Dgraph guys read some papers on distributed transactions: Do you guys remember what the other 5 papers were, and if so, could you provide the links, pl…

---

## [Badger 1.6 backup is not restored properly on 3.0](https://discuss.dgraph.io/t/badger-1-6-backup-is-not-restored-properly-on-3-0/14875)

<div class="topic-metadata">

**Author:** [@kshcherban](https://discuss.dgraph.io/u/kshcherban)\
**Replies:** 0\
**Last updated:** [July 8, 2021, 2:09pm UTC](https://discuss.dgraph.io/t/badger-1-6-backup-is-not-restored-properly-on-3-0/14875 "2021-07-08T14:09:03Z")

</div>

What version of Go are you using (go version)? $ go version go version go1.13.8 linux/amd64 What operating system are you using? Ubuntu 20.04 What version of Badger are you using? 1.6.2, 3.2103.1 Does this issue repro…

---

## [BadgerDB v3.2103.1 release](https://discuss.dgraph.io/t/badgerdb-v3-2103-1-release/14871)

<div class="topic-metadata">

**Author:** [@Naman](https://discuss.dgraph.io/u/Naman)\
**Replies:** 0\
**Last updated:** [July 8, 2021, 10:29am UTC](https://discuss.dgraph.io/t/badgerdb-v3-2103-1-release/14871 "2021-07-08T10:29:50Z")

</div>

Hey folks, we have released v3.2103.1 Badger DB. This release removes CGO dependency of badger by using Klauspost’s ZSTD instead of Datadog’s ZSTD. Also, this has some of the fixes. Fixed fix(compaction): copy over …

---

## [Race condition: Missing entries in key value store](https://discuss.dgraph.io/t/race-condition-missing-entries-in-key-value-store/14353)

<div class="topic-metadata">

**Author:** [@bloritsch](https://discuss.dgraph.io/u/bloritsch)\
**Replies:** 8\
**Last updated:** [July 1, 2021, 5:26pm UTC](https://discuss.dgraph.io/t/race-condition-missing-entries-in-key-value-store/14353 "2021-07-01T17:26:54Z")

</div>

I am playing around with using Badger as an event store for an app I’m building. My unit tests uncovered something unsettling, but at the moment I am assuming this is an ID10T error (problem lies between my head and key…

---

## [Lost transactions on old hardware: No errors returned](https://discuss.dgraph.io/t/lost-transactions-on-old-hardware-no-errors-returned/14761)

<div class="topic-metadata">

**Author:** [@bloritsch](https://discuss.dgraph.io/u/bloritsch)\
**Replies:** 5\
**Last updated:** [July 1, 2021, 5:26pm UTC](https://discuss.dgraph.io/t/lost-transactions-on-old-hardware-no-errors-returned/14761 "2021-07-01T17:26:05Z")

</div>

I’ve built more around my project thinking that the “if windows, add delay” on writes was sufficient, since Windows is not officially supported by the Badger team. It turns out the issue may be a bit deeper than that. …

---

## [Reverse Iterator does not seem to be working](https://discuss.dgraph.io/t/reverse-iterator-does-not-seem-to-be-working/14448)

<div class="topic-metadata">

**Author:** [@bloritsch](https://discuss.dgraph.io/u/bloritsch)\
**Replies:** 2\
**Last updated:** [June 5, 2021, 10:24pm UTC](https://discuss.dgraph.io/t/reverse-iterator-does-not-seem-to-be-working/14448 "2021-06-05T22:24:43Z")

</div>

I want to provide a “tail” function for my eventstore I’m building on top of Badger, so that any query microservices can detect if there are changes since the last time it looked. The events are stored with a concatenat…

[Next page](https://discuss.dgraph.io/tag/badger/85.md?match_all_tags=true&page=1&tags%5B%5D=badger)
