Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions engine/packages/engine/src/util/wf/signal.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use anyhow::*;
use chrono::{Local, TimeZone};
use chrono::{TimeZone, Utc};
use rivet_term::console::style;

use gas::db::debug::{SignalData, SignalState};
Expand All @@ -22,7 +22,7 @@ pub async fn print_signals(signals: Vec<SignalData>, pretty: bool) -> Result<()>

println!(" {} {}", style("id").bold(), signal.signal_id);

let datetime = Local
let datetime = Utc
.timestamp_millis_opt(signal.create_ts)
.single()
.context("invalid ts")?;
Expand All @@ -31,7 +31,7 @@ pub async fn print_signals(signals: Vec<SignalData>, pretty: bool) -> Result<()>
println!(" {} {}", style("created at").bold(), style(date).magenta());

if let Some(ack_ts) = signal.ack_ts {
let datetime = Local
let datetime = Utc
.timestamp_millis_opt(ack_ts)
.single()
.context("invalid ts")?;
Expand Down
2 changes: 1 addition & 1 deletion engine/packages/gasoline/src/ctx/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ pub fn setup_logging() {
// Set up logging
let _ = tracing_subscriber::fmt()
.with_env_filter("debug")
.with_ansi(false)
.with_ansi(true)
.with_test_writer()
.try_init();
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use crate::options::ConflictRangeType;
// that
const TXN_CONFLICT_TTL: Duration = Duration::from_secs(10);

#[derive(Debug)]
struct PreviousTransaction {
insert_instant: Instant,
start_version: u64,
Expand Down Expand Up @@ -56,8 +57,9 @@ impl TransactionConflictTracker {
txns.retain(|txn| txn.insert_instant.elapsed() < TXN_CONFLICT_TTL);

for txn2 in &*txns {
// Check txn versions overlap
if txn1_start_version > txn2.start_version && txn1_start_version < txn2.commit_version {
// Check txn versions overlap (intersection or encapsulation)
if txn1_start_version < txn2.commit_version && txn2.start_version < txn1_commit_version
{
for (cr1_start, cr1_end, cr1_type) in &txn1_conflict_ranges {
for (cr2_start, cr2_end, cr2_type) in &txn2.conflict_ranges {
// Check conflict ranges overlap
Expand Down
Loading