Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jjbayer committed Oct 28, 2024
1 parent 2de20ef commit 23f3bde
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 16 deletions.
1 change: 0 additions & 1 deletion Dockerfile.release
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ WORKDIR /work

EXPOSE 3000

# Copy main executable
COPY $TARGETPLATFORM/relay /bin/relay
RUN chmod +x /bin/relay
COPY $TARGETPLATFORM/relay-debug.zip /opt/relay-debug.zip
Expand Down
2 changes: 1 addition & 1 deletion relay-config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ fn spool_envelopes_unspool_interval() -> u64 {

/// Default number of envelope to read from disk at once.
fn spool_envelopes_read_batch_size() -> usize {
10
200
}

/// Default number of encoded envelope bytes to cache before writing to disk.
Expand Down
8 changes: 0 additions & 8 deletions relay-server/src/services/buffer/envelope_stack/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,6 @@ impl SqliteEnvelopeStack {
let batch = std::mem::take(&mut self.batch);
relay_statsd::metric!(counter(RelayCounters::BufferSpooledEnvelopes) += batch.len() as u64);

// TODO: log serialization metric

// // We convert envelopes into a format which simplifies insertion in the store. If an
// // envelope can't be serialized, we will not insert it.
// let envelopes = relay_statsd::metric!(timer(RelayTimers::BufferEnvelopesSerialization), {
// envelopes.iter().filter_map(|e| e.as_ref().try_into().ok())
// });

// When early return here, we are acknowledging that the elements that we popped from
// the buffer are lost in case of failure. We are doing this on purposes, since if we were
// to have a database corruption during runtime, and we were to put the values back into
Expand Down
6 changes: 0 additions & 6 deletions relay-server/src/services/buffer/envelope_store/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,16 +467,10 @@ fn extract_envelope(
let encoded_envelope: Vec<u8> = row
.try_get("envelope")
.map_err(SqliteEnvelopeStoreError::FetchError)?;
// let envelope_bytes = bytes::Bytes::from(envelope_row);
// let mut envelope = Envelope::parse_bytes(envelope_bytes)
// .map_err(|_| SqliteEnvelopeStoreError::EnvelopeExtractionError)?;

let received_at: i64 = row
.try_get("received_at")
.map_err(SqliteEnvelopeStoreError::FetchError)?;
// let start_time = StartTime::from_timestamp_millis(received_at as u64); .. TODO

// envelope.set_start_time(start_time.into_inner());

Ok(InsertEnvelope {
received_at,
Expand Down

0 comments on commit 23f3bde

Please sign in to comment.