A FETCH with CHANGEDSINCE presents its mod-sequence to the read scope, so a replica must have that change before it answers, as a JMAP sinceState already did. replica_cluster_tests covers test 11: with the replica's replay paused, a write on one node is read back through a second store with its own marks, sharing through Redis. Composite stores nest store futures deeply enough to pass rustc's default query depth once both postgres and redis are compiled in, so the server crates raise their recursion limit.
59 lines
1.5 KiB
Rust
59 lines
1.5 KiB
Rust
/*
|
|
* SPDX-FileCopyrightText: 2020 Stalwart Labs LLC <[email protected]>
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
|
|
*/
|
|
|
|
// inbuxa: composite stores (sharded members, read replicas) nest store
|
|
// futures deeply enough to pass rustc's default query depth
|
|
#![recursion_limit = "512"]
|
|
|
|
#![warn(clippy::large_futures)]
|
|
|
|
#[allow(unused_imports)]
|
|
use std::sync::Arc;
|
|
|
|
pub mod backend;
|
|
pub mod bootstrap;
|
|
pub mod dispatch;
|
|
|
|
#[derive(Clone, Default)]
|
|
pub enum Coordinator {
|
|
#[cfg(feature = "redis")]
|
|
Redis(Arc<store::backend::redis::RedisStore>),
|
|
#[cfg(feature = "nats")]
|
|
Nats(Arc<backend::nats::NatsPubSub>),
|
|
#[cfg(feature = "zenoh")]
|
|
Zenoh(Arc<backend::zenoh::ZenohPubSub>),
|
|
#[cfg(feature = "kafka")]
|
|
Kafka(Arc<backend::kafka::KafkaPubSub>),
|
|
#[default]
|
|
None,
|
|
}
|
|
|
|
pub enum PubSubStream {
|
|
#[cfg(feature = "redis")]
|
|
Redis(crate::backend::redis::pubsub::RedisPubSubStream),
|
|
#[cfg(feature = "redis")]
|
|
RedisCluster(crate::backend::redis::pubsub::RedisClusterPubSubStream),
|
|
#[cfg(feature = "nats")]
|
|
Nats(crate::backend::nats::pubsub::NatsPubSubStream),
|
|
#[cfg(feature = "zenoh")]
|
|
Zenoh(crate::backend::zenoh::pubsub::ZenohPubSubStream),
|
|
#[cfg(feature = "kafka")]
|
|
Kafka(crate::backend::kafka::pubsub::KafkaPubSubStream),
|
|
Unimplemented,
|
|
}
|
|
|
|
pub enum Msg {
|
|
#[cfg(feature = "redis")]
|
|
Redis(redis::Msg),
|
|
#[cfg(feature = "nats")]
|
|
Nats(async_nats::Message),
|
|
#[cfg(feature = "zenoh")]
|
|
Zenoh(Vec<u8>),
|
|
#[cfg(feature = "kafka")]
|
|
Kafka(Vec<u8>),
|
|
Unimplemented,
|
|
}
|