ozontech / ozontech/seq-db

Core System Refactoring for Fraction Management Consistency and Performance

Open
#138 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Go
Stars
131
Forks
16
Avg merge
2d 4h
Merged PRs (30d)
11

Description

Primary Goals:

  • Ensure State Consistency During S3 Offloading: Prevent fractions from temporarily disappearing during upload, which causes unstable and unpredictable search results.
  • Fix Interface Segregation Principle (ISP) Violation: The Fraction interface currently forces all implementations to define an Offloading method, which is only relevant for a specific type. This requires others to provide meaningless stub methods.
  • Unblock Compaction: Establish a clear and reliable state management system for fractions to correctly identify candidates for the compaction process.
  • Queue Size Control & Overflow Handling: Implement monitoring and size limiting mechanisms for the Offloading and Sealing queues. Develop an overflow strategy (e.g., rejecting new tasks or eviction).

Secondary Goals (Optimization & Refactoring):

  • Simplify Fraction Interface: Remove DataProvider by moving its Search and Fetch methods directly into the Fraction interface.
  • Simplify Fraction Implementations: Remove internal mutexes from active and sealed fraction implementations. Thread safety will be centralized and handled by the FractionManager.
  • Cache Fraction List: Cache the list of fractions in FractionManager and update it only upon actual changes (add/remove), instead of rebuilding it before every search operation.
  • Optimize Statistics Calculation: Shift from a periodic full recalculation (every 10 seconds) to an incremental update model. Statistics will be updated after every change to the fraction composition, reducing system load.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating Fraction, FractionManager, DataProvider, and the Offloading and Sealing queues, then trace state changes during S3 offloading and compaction. Done means the listed consistency, interface, queue, caching, and statistics goals are implemented and verified by the project’s relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, databases, performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.