Joe Tsai 2ad040db3b ipn/store: improve FileStore.WriteState atomicity
If an error occurs with FileStore.WriteState, it should not record
the provided value as this results in an inconsistency between
what is cached in memory and what is stored on disk.

Also, update the documentation of StateStore.ReadState
to indicate that the returned value should be treated as immutable.
This property is assumed by the fact that FileStore.ReadState
returns the same slice of bytes for repeated calls to the same key.

Updates #cleanup

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2023-11-06 11:45:10 -08:00
..
2023-10-09 08:15:38 +02:00
2023-10-09 08:15:38 +02:00
2023-10-09 08:15:38 +02:00
2023-10-09 08:15:38 +02:00
2023-09-28 09:16:25 -07:00