Company
Date Published
Author
Ted Kaemming, James Cunningham, Filippo Pacifici
Word count
2873
Language
English
Hacker News points
None

Summary

In Sentry's system designed for immutable data, ClickHouse was chosen as the database that underpins Snuba, their service for storing and searching event data, due to its fast aggregations over large numbers of rows and bulk insertion capabilities. To adapt to a database architecture primarily designed for immutable data, ClickHouse's ReplacingMergeTree engine was used to store Sentry events, which allows for fast deletion by replacing existing rows with new ones that contain the same primary key but different deleted values. However, this approach highlights issues such as potential inconsistencies when multiple rows have the same primary key in different data parts until optimization occurs, and the need for strategies like tracking recently deleted issues or using bulk operations to reduce these inconsistencies. By understanding how ClickHouse works and being willing to strip away non-essential features, Sentry was able to create a high-performance system that meets their needs despite its departure from traditional database designs.