From b28a83c00503e0ac1c40c73dc093d8b0f164a6cc Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 20 Jan 2025 11:44:34 -0800 Subject: Bu::MyriadCache was truncating existing dbs. When opening an existing database, while loading the index Bu::MyriadCache would open it with the WriteNew option, even though it didn't need to write. This now truncates the stream appropriately, so it never found any data and proceeded as though it was a new database. --- src/unstable/myriadcache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/unstable/myriadcache.h b/src/unstable/myriadcache.h index 289ab05..3629005 100644 --- a/src/unstable/myriadcache.h +++ b/src/unstable/myriadcache.h @@ -29,7 +29,7 @@ namespace Bu { Bu::ReadWriteMutex::ReadLocker l( rwStore ); Bu::MyriadStream ms = mStore.open( - 1, Bu::Myriad::WriteNew|Bu::Myriad::Read + 1, Bu::Myriad::Read ); Bu::Archive ar( ms, Bu::Archive::load ); uint8_t uVer; -- cgit v1.2.3