cosmos-sdk/store
yihuang 1f91ee2ee9
fix: state listener observe writes at wrong time (#13516)
* fix: state listener observe writes at wrong time

Closes: #13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

* synchronous abci call, and format doc

* fix comment

* update file streamer readme and fix typos

* typo

* fix: state listener observe writes at wrong time

Closes: #13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

synchronous abci call, and format doc

fix comment

update file streamer readme and fix typos

typo

* improve UX of file streamer, make it immediately usable after enabled

- set default value to write_dir.
- make write_dir based on home directory by default.
- auto-create the directory if not exists.

* get homePage from opts

Co-authored-by: Marko <marbar3778@yahoo.com>
2022-12-02 15:43:21 +01:00
..
cache test: Add some tests and remove dead code in store (#13614) 2022-11-08 20:20:18 +00:00
cachekv fix: state listener observe writes at wrong time (#13516) 2022-12-02 15:43:21 +01:00
cachemulti fix: state listener observe writes at wrong time (#13516) 2022-12-02 15:43:21 +01:00
dbadapter fix: state listener observe writes at wrong time (#13516) 2022-12-02 15:43:21 +01:00
gaskv fix: state listener observe writes at wrong time (#13516) 2022-12-02 15:43:21 +01:00
iavl fix: state listener observe writes at wrong time (#13516) 2022-12-02 15:43:21 +01:00
internal test: Add some tests and remove dead code in store (#13614) 2022-11-08 20:20:18 +00:00
listenkv fix: state listener observe writes at wrong time (#13516) 2022-12-02 15:43:21 +01:00
mem fix: state listener observe writes at wrong time (#13516) 2022-12-02 15:43:21 +01:00
prefix fix: state listener observe writes at wrong time (#13516) 2022-12-02 15:43:21 +01:00
pruning chore: move pruning to store (#13609) 2022-10-24 14:02:17 +02:00
rootmulti fix: state listener observe writes at wrong time (#13516) 2022-12-02 15:43:21 +01:00
snapshots refactor: move snapshotstore under store (#14048) 2022-11-29 23:40:14 +00:00
streaming fix: state listener observe writes at wrong time (#13516) 2022-12-02 15:43:21 +01:00
tracekv fix: state listener observe writes at wrong time (#13516) 2022-12-02 15:43:21 +01:00
transient chore: move pruning to store (#13609) 2022-10-24 14:02:17 +02:00
types fix: state listener observe writes at wrong time (#13516) 2022-12-02 15:43:21 +01:00
reexport.go refactor!: abstractions for snapshot and pruning; snapshot intervals eventually pruned; unit tests (#11496) 2022-04-21 15:30:36 -04:00
store.go refactor!: abstractions for snapshot and pruning; snapshot intervals eventually pruned; unit tests (#11496) 2022-04-21 15:30:36 -04:00