- Timeline::get calls reconstruct data ⇒ turn that into a Pin<Box<dyn Future…>> .
- Problem there: we call layer.get_reconstruct_data while holding layer map lock ⇒ it’s a std rwlock ⇒ need to turn it into tokio mutex
- Problem there: we sometimes hold the Tenant::timelines std mutex while holding layer map lock (branching?) ⇒ need to turn it into tokio mutex
- Prolem there: tenant.rs `self.state.send_modify(|| { ... timelines.lock().await })`;
  Can't await inside the closure, and we don't have async closures.
  And we don't control the tokio::sync::watch API.

So, tackle things in reverse here.
This commit is contained in:
Christian Schwarz
2023-05-10 18:00:52 +02:00
parent bb06d281ea
commit bd516a491b

Diff Content Not Available