One bad event fails every event in its environment's batch

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

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
43/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
clickhouse, python

Research direction

The issue points to the batch insert and retry-topic behavior but names no files or tests. Start by tracing how each environment’s events are inserted and how schema_mismatch failures are retried; then identify a way to prevent one invalid row from causing valid events to be dropped. Done when valid events in a batch can still be delivered despite a bad row.

Written by the indexing model from the issue text.

Description

Raised in https://github.com/Flagsmith/warehouse-delivery/pull/6#discussion_r4134979911.

Each environment's events in a batch go to the warehouse in one insert. If one row doesn't fit the customer's table (e.g. a bad timestamp), ClickHouse rejects the whole insert with schema_mismatch. All of those events then go to the retry topic, fail together on every retry, and are dropped once MAX_RETRIES is used up, including the valid ones.

Dominant language
Python
Stars
2
Forks
0
Avg merge
14h 29m
Merged PRs (30d)
3

Getting set up

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.

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.