Replying to Avatar kero

Hey nostr:npub1y0emt2wlpsezcnmxtyrpf33qe7gwy5u8yzssvv6uw53em0k32t7q7smm9n, we want to, zero-downtime swap an #LMDB environment that comes from an S3 with one that is already on disk (and opened). My first idea was to open the incoming env, open a write txn on the dst one and clear and copy the entries into the existing one but I fear about the MDB_TXN_FULL error. The second idea is to close the env (awaiting running txns) and swap the env files. This can produce a downtime. Do you recommend anything else?

nostr:npub1aza2n933qjucyr65phn5h8wu35kkdhxu90gl0a98jqxmg87krp2sp3c2m8 closing and swapping files seems your best bet. That's really only a couple syscalls, while copying the data could take substantial time. On non-Windows you could open the new env first and use it immediately, renaming later. Windows unfortunately can't rename an open file.

Reply to this note

Please Login to reply.

Discussion

No replies yet.