Skip to content

Commit

Permalink
Doc store batching (#3)
Browse files Browse the repository at this point in the history
* move table definition into separate file

* Add table structs and traits

* start replacing explicit table access with tables struct

* more table use

* try to hide db use a bit

* more tables use

* add read and modify fns everywhere

* First impl of batching

* Eliminate one out of 2 places where we need to store a table in an iterator

* shut up clippy!

* introduce ReplicaInfo

* pass in store to replica and replica_if_sync

WIP

* try to avoid using the actual replica

often you just need to modify the info or the state

* remove close

it seems to do nothing.

* simplify close callback

* remove the close callbacks entirely

* Add more trait impls

* separate loading info and creating the actual replica

* make replica a transient thing

* &mut T or T, your choice!

* Last step in making StoreInstance and Replica ephemeral (or at least optionally ephemeral)

* all tests passing

We can eliminate AlreadyOpen because rust will make sure we open only 1 replica now!

* get rid of the arc

* WIP

* back to .modify

due to Voultapher/self_cell#14

* don't import derive_more

* Rename the table access methods

modify(f) to modify
readonly for ro view of mutable table
snapshot for a real readonly snapshot

* fix test_migration_001_populate_latest_table test

you need to explicitly call flush now before copying the disk image!

---------

Co-authored-by: Ruediger Klaehn <[email protected]>
  • Loading branch information
ppodolsky and rklaehn authored Apr 13, 2024
1 parent cd61d69 commit b45b0c6
Show file tree
Hide file tree
Showing 18 changed files with 1,386 additions and 751 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions iroh-sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ tokio-util = { version = "0.7", optional = true, features = ["codec", "io-util",
tokio-stream = { version = "0.1", optional = true, features = ["sync"]}
quinn = { version = "0.10", optional = true }
futures = { version = "0.3", optional = true }
self_cell = "1.0.3"

[dev-dependencies]
iroh-test = { path = "../iroh-test" }
Expand Down
Loading

0 comments on commit b45b0c6

Please sign in to comment.