jsondb-core
jsondb-core copied to clipboard
Symlinks broken
Seems like the database gets rewritten every time there's a modification to the data. This makes it impossible to use symlinks
the changes are written to a tmp file then moved: https://github.com/Jsondb/jsondb-core/blob/master/src/main/java/io/jsondb/io/JsonWriter.java#L391
This is by design.
To support atomicity I create a temporary file, if everything succeeds then the tmp file replaces the original file in one IO call. This is the only way to guarantee atomicity.