This design aims to reduce MVCC bloat by using an append-only model: rows are inserted, but never updated.
Expired rows are removed through CockroachDB Row-Level TTL.
The overall architecture is inspired by Apache Kafka.
| import sys | |
| counter = [0] | |
| with open(sys.argv[1], "r") as f: | |
| for line in f: | |
| # identify a heading line | |
| if line and line[0:2] == "##": | |
| heading_md, heading_title = line.split(" ", 1) |