Skip to content

Reduce commit() calls in compression scheduler to improve transaction handling and performance #1679

@coderabbitai

Description

@coderabbitai

Context

During the review of PR #1637, it was observed that compression_scheduler.py calls .commit() immediately after every .execute() statement. This pattern prevents batching of SQL statements and causes two issues:

  1. Loss of atomicity: Write-after-read operations may lose atomicity if commits occur between reads and writes, potentially allowing overwrites. Currently mitigated by having a single compression scheduler instance per deployment.
  2. Performance overhead: Frequent commits add overhead that hurts performance.

Goal

Investigate and implement a solution to reduce the frequency of .commit() calls in the compression scheduler, enabling better use of transactions and improving performance.

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions