You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cosmic-swingset currently accomodates platforms which do not support LMDB (https://github.com/Agoric/agoric-sdk/blob/1de9ee6101b0a33b3f0fca853bf02d8a446cbe5a/packages/cosmic-swingset/src/check-lmdb.js) by falling back to the "jsonlines" persistence mode of "swing-store-simple" (which otherwise keeps all of its state in RAM, in one big Map). In this mode, commit() serializes the entire Map and writes it to a file, and open() reads that entire file back into memory. Obviously, this only performs acceptably for toy examples or unit tests, but it's the one we started with, and we didn't remove it after getting LMDB.
I think we added this fallback when we identified LMDB problems on WSL, but I also think we subsequently found a better workaround (tell LMDB to not use sparse files or mmap()).
We're adding (#3065, #3122) a feature to the kernelDB that moves large transcript entries out of the key-value store and into linear auxilliary files. The LMDB implementation is the most important one, and we're adding a comparable API to the in-RAM non-persistent flavor of swing-store-simple. But we don't want to implement persistence for the new API, and in fact we intend to get rid of the persistent mode altogether.
So the task is to change cosmic-swingset to remove this fallback to swing-store-simple. If LMDB doesn't work, cosmic-swingset cannot be run on that platform (since it couldn't be run remotely efficiently there anyways).
I think we added this fallback when we identified LMDB problems on WSL, but I also think we subsequently found a better workaround (tell LMDB to not use sparse files or mmap()).
I find it funny that the #950 discussion that is linked just above the fallback code in question definitively resolves the problem for which this fallback was built!
Good thing we have github as memory. I wasn't aware of the LMDB workaround in #985, and neither @warner nor @FUDCo seemed to know that #985 meant the current issue's fallback can be removed.
Heh, yeah. I think we wrote the "use simplestore" workaround as a quick hack while @FUDCo was locked in a cave diagnosing the mmap problem, and we wound up with both, and then moved on to the next fire without removing the redundant workaround.
cosmic-swingset currently accomodates platforms which do not support LMDB (https://github.com/Agoric/agoric-sdk/blob/1de9ee6101b0a33b3f0fca853bf02d8a446cbe5a/packages/cosmic-swingset/src/check-lmdb.js) by falling back to the "jsonlines" persistence mode of "swing-store-simple" (which otherwise keeps all of its state in RAM, in one big
Map
). In this mode,commit()
serializes the entire Map and writes it to a file, andopen()
reads that entire file back into memory. Obviously, this only performs acceptably for toy examples or unit tests, but it's the one we started with, and we didn't remove it after getting LMDB.I think we added this fallback when we identified LMDB problems on WSL, but I also think we subsequently found a better workaround (tell LMDB to not use sparse files or
mmap()
).We're adding (#3065, #3122) a feature to the kernelDB that moves large transcript entries out of the key-value store and into linear auxilliary files. The LMDB implementation is the most important one, and we're adding a comparable API to the in-RAM non-persistent flavor of swing-store-simple. But we don't want to implement persistence for the new API, and in fact we intend to get rid of the persistent mode altogether.
So the task is to change cosmic-swingset to remove this fallback to swing-store-simple. If LMDB doesn't work, cosmic-swingset cannot be run on that platform (since it couldn't be run remotely efficiently there anyways).
Originally posted by @warner in #3122 (comment)
The text was updated successfully, but these errors were encountered: