Skip to content

Commit

Permalink
Fixed tracing index table type for SQL stores
Browse files Browse the repository at this point in the history
  • Loading branch information
mdecimus committed Aug 21, 2024
1 parent e54c3ab commit bd4129e
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions crates/common/src/enterprise/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ impl Enterprise {
.property_or_default::<Option<Duration>>("storage.undelete.retention", "false")
.unwrap_or_default(),
trace_hold_period: config
.property_or_default::<Option<Duration>>("tracing.history.retention", "90d")
.unwrap_or(Some(Duration::from_secs(90 * 24 * 60 * 60))),
.property_or_default::<Option<Duration>>("tracing.history.retention", "30d")
.unwrap_or(Some(Duration::from_secs(30 * 24 * 60 * 60))),
trace_store: config
.value("tracing.history.store")
.and_then(|name| stores.stores.get(name))
Expand Down
2 changes: 1 addition & 1 deletion crates/store/src/backend/mysql/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ impl MysqlStore {
SUBSPACE_FTS_INDEX,
SUBSPACE_LOGS,
SUBSPACE_TRACE,
SUBSPACE_TRACE_INDEX,
] {
let table = char::from(table);
conn.query_drop(&format!(
Expand Down Expand Up @@ -135,7 +136,6 @@ impl MysqlStore {
SUBSPACE_BITMAP_ID,
SUBSPACE_BITMAP_TAG,
SUBSPACE_BITMAP_TEXT,
SUBSPACE_TRACE_INDEX,
] {
let table = char::from(table);
conn.query_drop(&format!(
Expand Down
2 changes: 1 addition & 1 deletion crates/store/src/backend/postgres/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ impl PostgresStore {
SUBSPACE_LOGS,
SUBSPACE_BLOBS,
SUBSPACE_TRACE,
SUBSPACE_TRACE_INDEX,
] {
let table = char::from(table);
conn.execute(
Expand All @@ -114,7 +115,6 @@ impl PostgresStore {
SUBSPACE_BITMAP_ID,
SUBSPACE_BITMAP_TAG,
SUBSPACE_BITMAP_TEXT,
SUBSPACE_TRACE_INDEX,
] {
let table = char::from(table);
conn.execute(
Expand Down
2 changes: 1 addition & 1 deletion crates/store/src/backend/sqlite/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ impl SqliteStore {
SUBSPACE_LOGS,
SUBSPACE_BLOBS,
SUBSPACE_TRACE,
SUBSPACE_TRACE_INDEX,
] {
let table = char::from(table);
conn.execute(
Expand All @@ -124,7 +125,6 @@ impl SqliteStore {
SUBSPACE_BITMAP_ID,
SUBSPACE_BITMAP_TAG,
SUBSPACE_BITMAP_TEXT,
SUBSPACE_TRACE_INDEX,
] {
let table = char::from(table);
conn.execute(
Expand Down
2 changes: 1 addition & 1 deletion crates/store/src/dispatch/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ impl Store {
(SUBSPACE_BITMAP_TEXT, false),
(SUBSPACE_INDEXES, false),
(SUBSPACE_TRACE, true),
(SUBSPACE_TRACE_INDEX, false),
(SUBSPACE_TRACE_INDEX, true),
] {
let from_key = crate::write::AnyKey {
subspace,
Expand Down
1 change: 1 addition & 0 deletions tests/src/jmap/enterprise.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ async fn undelete(_params: &mut JMAPTest) {
api.get::<serde_json::Value>("/api/store/purge/account/[email protected]")
.await
.unwrap();
tokio::time::sleep(Duration::from_millis(200)).await;
let deleted = api
.get::<List<DeletedBlob<String, String, String>>>("/api/store/undelete/[email protected]")
.await
Expand Down
4 changes: 2 additions & 2 deletions tests/src/jmap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ pub async fn jmap_tests() {
)
.await;

/*webhooks::test(&mut params).await;
webhooks::test(&mut params).await;
email_query::test(&mut params, delete).await;
email_get::test(&mut params).await;
email_set::test(&mut params).await;
Expand All @@ -325,7 +325,7 @@ pub async fn jmap_tests() {
quota::test(&mut params).await;
crypto::test(&mut params).await;
blob::test(&mut params).await;
purge::test(&mut params).await;*/
purge::test(&mut params).await;
enterprise::test(&mut params).await;

if delete {
Expand Down

0 comments on commit bd4129e

Please sign in to comment.