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.
67 lines
1.3 KiB
Rust
67 lines
1.3 KiB
Rust
/*
|
|
* SPDX-FileCopyrightText: 2020 Stalwart Labs LLC <[email protected]>
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
|
|
*/
|
|
|
|
// inbuxa: composite stores nest store futures deeply enough to pass
|
|
// rustc's default query depth
|
|
#![recursion_limit = "512"]
|
|
|
|
#[cfg(test)]
|
|
use ::store::registry::bootstrap::Bootstrap;
|
|
#[cfg(not(any(target_env = "msvc", target_os = "freebsd")))]
|
|
use tikv_jemallocator::Jemalloc;
|
|
|
|
#[cfg(not(any(target_env = "msvc", target_os = "freebsd")))]
|
|
#[global_allocator]
|
|
static GLOBAL: Jemalloc = Jemalloc;
|
|
|
|
#[cfg(test)]
|
|
pub mod automation;
|
|
#[cfg(test)]
|
|
pub mod cluster;
|
|
#[cfg(test)]
|
|
pub mod directory;
|
|
#[cfg(test)]
|
|
pub mod imap;
|
|
#[cfg(test)]
|
|
pub mod jmap;
|
|
#[cfg(test)]
|
|
pub mod scim;
|
|
#[cfg(test)]
|
|
pub mod smtp;
|
|
#[cfg(test)]
|
|
pub mod store;
|
|
#[cfg(test)]
|
|
pub mod system;
|
|
#[cfg(test)]
|
|
pub mod telemetry;
|
|
#[cfg(test)]
|
|
pub mod utils;
|
|
#[cfg(test)]
|
|
pub mod webdav;
|
|
|
|
#[cfg(test)]
|
|
pub trait AssertConfig {
|
|
fn assert_no_errors(self) -> Self;
|
|
fn assert_no_warnings(self) -> Self;
|
|
}
|
|
|
|
#[cfg(test)]
|
|
impl AssertConfig for Bootstrap {
|
|
fn assert_no_errors(self) -> Self {
|
|
if !self.errors.is_empty() {
|
|
panic!("Errors: {:#?}", self.errors);
|
|
}
|
|
self
|
|
}
|
|
|
|
fn assert_no_warnings(self) -> Self {
|
|
if !self.warnings.is_empty() {
|
|
panic!("Warnings: {:#?}", self.warnings);
|
|
}
|
|
self
|
|
}
|
|
}
|