laanwj on Nostr: the logic to resize is in src/lmdb/database.cpp, in database::resize(); apparently it ...
the logic to resize is in src/lmdb/database.cpp, in database::resize(); apparently it doubles the size until it's larger than 1GB, after that it adds at most a GB at a time
it's called in database::do_create_txn
i think the biggest complication is making transactions restartable; resizing cancels the current transaction so it has to be re-issued
Published at
2024-11-23 22:22:54Event JSON
{
"id": "68c68722dedca480d105c783d19126da1337e5157c7c18e0ffc86f2c7bddfb84",
"pubkey": "0aa39e5aef99a000a7bdb0b499158c92bc4aa20fb65931a52d055b5eb6dff738",
"created_at": 1732400574,
"kind": 1,
"tags": [
[
"e",
"d409259b5cb5aadfa08a6640f7f089e47fd7663e10b22755814903401dfbc1ab",
"wss://relay.primal.net/",
"root"
],
[
"e",
"ed0ff84b50eb79264a447d69f047f10a4781f1bb718591803843a357721597ae",
"nostr-idb://cache-relay",
"reply"
],
[
"p",
"ee9d979e7e1418a9f7472baf82dc96082a0d4251b77bcb170a6ecec93fadff64",
"",
"mention"
],
[
"p",
"3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d",
"",
"mention"
],
[
"client",
"noStrudel",
"31990:266815e0c9210dfa324c6cba3573b14bee49da4209a9456f9484e5106cd408a5:1686066542546"
]
],
"content": "the logic to resize is in src/lmdb/database.cpp, in database::resize(); apparently it doubles the size until it's larger than 1GB, after that it adds at most a GB at a time\nit's called in database::do_create_txn\ni think the biggest complication is making transactions restartable; resizing cancels the current transaction so it has to be re-issued",
"sig": "808b9c8231b3ac8f4b46dc89260ae332880108ee43a5faa0665ec9e177ea45b0efd3801e5813ef435d3a261cf0d9e8b024b8408858681cabe5d61b5723c6bc6e"
}