Skip to content

Commit 7f2396a

Browse files
authored
feat: don't store duplicated message columns (#581)
- channel_id/topic/sortkey_timestamp (in the row key) - expiry (in the cell timestamps) (we can always add these back to messages later if they are worth having) - make add_user conditional, erroring out if the user already exists - utilize row_limit in message reads - enforce non null columns on deserialization Closes: SYNC-4070 Closes: SYNC-4099 Closes: SYNC-4106
1 parent 8026449 commit 7f2396a

5 files changed

Lines changed: 140 additions & 195 deletions

File tree

autopush-common/src/db/bigtable/bigtable_client/merge.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,6 @@ impl RowMerger {
376376
/// Iterate through all the returned chunks and compile them into a hash of finished cells indexed by row_key
377377
pub async fn process_chunks(
378378
mut stream: ClientSStreamReceiver<ReadRowsResponse>,
379-
limit: Option<usize>,
380379
) -> Result<BTreeMap<RowKey, Row>, BigTableError> {
381380
// Work object
382381
let mut merger = Self::default();
@@ -385,11 +384,6 @@ impl RowMerger {
385384
let mut rows = BTreeMap::<RowKey, Row>::new();
386385

387386
while let (Some(row_resp_res), s) = stream.into_future().await {
388-
if let Some(limit) = limit {
389-
if limit > 0 && rows.len() > limit {
390-
break;
391-
}
392-
}
393387
stream = s;
394388
let row = match row_resp_res {
395389
Ok(v) => v,

0 commit comments

Comments
 (0)