Fixed tracing index table type for SQL stores
Some checks failed
trivy / Check (push) Failing after -8m6s

This commit is contained in:
mdecimus 2024-08-21 18:32:59 +02:00
parent e54c3abad4
commit bd4129e160
7 changed files with 9 additions and 8 deletions

View file

@ -60,8 +60,8 @@ impl Enterprise {
.property_or_default::<Option<Duration>>("storage.undelete.retention", "false") .property_or_default::<Option<Duration>>("storage.undelete.retention", "false")
.unwrap_or_default(), .unwrap_or_default(),
trace_hold_period: config trace_hold_period: config
.property_or_default::<Option<Duration>>("tracing.history.retention", "90d") .property_or_default::<Option<Duration>>("tracing.history.retention", "30d")
.unwrap_or(Some(Duration::from_secs(90 * 24 * 60 * 60))), .unwrap_or(Some(Duration::from_secs(30 * 24 * 60 * 60))),
trace_store: config trace_store: config
.value("tracing.history.store") .value("tracing.history.store")
.and_then(|name| stores.stores.get(name)) .and_then(|name| stores.stores.get(name))

View file

@ -106,6 +106,7 @@ impl MysqlStore {
SUBSPACE_FTS_INDEX, SUBSPACE_FTS_INDEX,
SUBSPACE_LOGS, SUBSPACE_LOGS,
SUBSPACE_TRACE, SUBSPACE_TRACE,
SUBSPACE_TRACE_INDEX,
] { ] {
let table = char::from(table); let table = char::from(table);
conn.query_drop(&format!( conn.query_drop(&format!(
@ -135,7 +136,6 @@ impl MysqlStore {
SUBSPACE_BITMAP_ID, SUBSPACE_BITMAP_ID,
SUBSPACE_BITMAP_TAG, SUBSPACE_BITMAP_TAG,
SUBSPACE_BITMAP_TEXT, SUBSPACE_BITMAP_TEXT,
SUBSPACE_TRACE_INDEX,
] { ] {
let table = char::from(table); let table = char::from(table);
conn.query_drop(&format!( conn.query_drop(&format!(

View file

@ -94,6 +94,7 @@ impl PostgresStore {
SUBSPACE_LOGS, SUBSPACE_LOGS,
SUBSPACE_BLOBS, SUBSPACE_BLOBS,
SUBSPACE_TRACE, SUBSPACE_TRACE,
SUBSPACE_TRACE_INDEX,
] { ] {
let table = char::from(table); let table = char::from(table);
conn.execute( conn.execute(
@ -114,7 +115,6 @@ impl PostgresStore {
SUBSPACE_BITMAP_ID, SUBSPACE_BITMAP_ID,
SUBSPACE_BITMAP_TAG, SUBSPACE_BITMAP_TAG,
SUBSPACE_BITMAP_TEXT, SUBSPACE_BITMAP_TEXT,
SUBSPACE_TRACE_INDEX,
] { ] {
let table = char::from(table); let table = char::from(table);
conn.execute( conn.execute(

View file

@ -105,6 +105,7 @@ impl SqliteStore {
SUBSPACE_LOGS, SUBSPACE_LOGS,
SUBSPACE_BLOBS, SUBSPACE_BLOBS,
SUBSPACE_TRACE, SUBSPACE_TRACE,
SUBSPACE_TRACE_INDEX,
] { ] {
let table = char::from(table); let table = char::from(table);
conn.execute( conn.execute(
@ -124,7 +125,6 @@ impl SqliteStore {
SUBSPACE_BITMAP_ID, SUBSPACE_BITMAP_ID,
SUBSPACE_BITMAP_TAG, SUBSPACE_BITMAP_TAG,
SUBSPACE_BITMAP_TEXT, SUBSPACE_BITMAP_TEXT,
SUBSPACE_TRACE_INDEX,
] { ] {
let table = char::from(table); let table = char::from(table);
conn.execute( conn.execute(

View file

@ -746,7 +746,7 @@ impl Store {
(SUBSPACE_BITMAP_TEXT, false), (SUBSPACE_BITMAP_TEXT, false),
(SUBSPACE_INDEXES, false), (SUBSPACE_INDEXES, false),
(SUBSPACE_TRACE, true), (SUBSPACE_TRACE, true),
(SUBSPACE_TRACE_INDEX, false), (SUBSPACE_TRACE_INDEX, true),
] { ] {
let from_key = crate::write::AnyKey { let from_key = crate::write::AnyKey {
subspace, subspace,

View file

@ -219,6 +219,7 @@ async fn undelete(_params: &mut JMAPTest) {
api.get::<serde_json::Value>("/api/store/purge/account/jdoe@example.com") api.get::<serde_json::Value>("/api/store/purge/account/jdoe@example.com")
.await .await
.unwrap(); .unwrap();
tokio::time::sleep(Duration::from_millis(200)).await;
let deleted = api let deleted = api
.get::<List<DeletedBlob<String, String, String>>>("/api/store/undelete/jdoe@example.com") .get::<List<DeletedBlob<String, String, String>>>("/api/store/undelete/jdoe@example.com")
.await .await

View file

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