eventstore: delete badger, it's too buggy.

This commit is contained in:
fiatjaf
2025-08-04 12:23:43 -03:00
parent 50c9ea3867
commit 6bda63de17
23 changed files with 19 additions and 1550 deletions
+8 -8
View File
@@ -49,14 +49,14 @@ func detect(dir string) (string, error) {
}
}
}
for _, entry := range entries {
if strings.HasSuffix(entry.Name(), ".mdb") {
return "lmdb", nil
}
if strings.HasSuffix(entry.Name(), ".vlog") {
return "badger", nil
}
}
// for _, entry := range entries {
// if strings.HasSuffix(entry.Name(), ".mdb") {
// return "lmdb", nil
// }
// if strings.HasSuffix(entry.Name(), ".vlog") {
// return "badger", nil
// }
// }
return "", fmt.Errorf("undetected")
}
+1 -4
View File
@@ -11,7 +11,6 @@ import (
"fiatjaf.com/nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr/eventstore/badger"
"fiatjaf.com/nostr/eventstore/lmdb"
"fiatjaf.com/nostr/eventstore/slicestore"
"github.com/urfave/cli/v3"
@@ -33,7 +32,7 @@ var app = &cli.Command{
&cli.StringFlag{
Name: "type",
Aliases: []string{"t"},
Usage: "store type ('lmdb', 'badger', 'mmm')",
Usage: "store type ('lmdb', 'mmm')",
},
},
Before: func(ctx context.Context, c *cli.Command) (context.Context, error) {
@@ -71,8 +70,6 @@ var app = &cli.Command{
switch typ {
case "lmdb":
db = &lmdb.LMDBBackend{Path: path}
case "badger":
db = &badger.BadgerBackend{Path: path}
case "mmm":
var err error
if db, err = doMmmInit(path); err != nil {