From e015483e4853303ed0dfe51f125fef33b9512f60 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 9 May 2023 14:56:06 +0800 Subject: [PATCH] RELEASE_NOTES: add LMDB migration script (#1743) --- RELEASE_NOTES.rst | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst index 71179152d..13f378a81 100644 --- a/RELEASE_NOTES.rst +++ b/RELEASE_NOTES.rst @@ -27,7 +27,22 @@ Highlights: * Full Python 3.10 support. * Distributed DMA is now supported, allowing DMA to be run directly on satellites for corresponding RTIO events, increasing bandwidth in scenarios with heavy satellite usage. -* Persistent datasets are now stored in a LMDB database for improved performance. +* Persistent datasets are now stored in a LMDB database for improved performance. PYON databases can + be converted with the script below. + +:: + + from sipyco import pyon + import lmdb + + old = pyon.load_file("dataset_db.pyon") + new = lmdb.open("dataset_db.mdb", subdir=False, map_size=2**30) + with new.begin(write=True) as txn: + for key, value in old.items(): + txn.put(key.encode(), pyon.encode(value).encode()) + new.close() + + ARTIQ-7 -------