nostrdb

an unfairly fast embedded nostr database backed by lmdb
git clone git://jb55.com/nostrdb
Log | Files | Refs | Submodules | README | LICENSE

commit 4b6d1d088b36064e1240a1cbf2cde60dbf2c095d
parent f59e6d65a94764dbb1b4d036640a37298bf5c6e3
Author: William Casarin <jb55@jb55.com>
Date:   Fri,  5 Jan 2024 20:46:02 -0800

index: make sure kind index is DUPSORT + INTEGERDUP

We will probably need a migration for this?

Diffstat:
Msrc/nostrdb.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/nostrdb.c b/src/nostrdb.c @@ -3645,7 +3645,9 @@ static int ndb_init_lmdb(const char *filename, struct ndb_lmdb *lmdb, size_t map } mdb_set_compare(txn, lmdb->dbs[NDB_DB_PROFILE_PK], ndb_tsid_compare); - if ((rc = mdb_dbi_open(txn, "note_kind", tsid_flags, &lmdb->dbs[NDB_DB_NOTE_KIND]))) { + if ((rc = mdb_dbi_open(txn, "note_kind", + MDB_CREATE | MDB_DUPSORT | MDB_INTEGERDUP | MDB_DUPFIXED, + &lmdb->dbs[NDB_DB_NOTE_KIND]))) { fprintf(stderr, "mdb_dbi_open note_kind failed: %s\n", mdb_strerror(rc)); return 0; }