Paper Note: Omid, Reloaded: Scalable and Highly-Available Transaction Processing

An entirely re-designed version of Omid1. Omid’s job is to manage the transaction control plane. The transaction metadata includes: A dedicated table(Commit Tabla, CT) holds a single record per committing transaction. Per-row metadata for items accessed by transactions. Feature: A middleware oriented. Snapshot isolate should provide: Visibility check rules. Write conflicts detection. Visibility Check Rules Intuitively, with SI, a transaction’s reads all appear to occur the time when it begins($ts_r$) while its writes appear to execute when it commits($ts_c$). ...

March 22, 2024 · 2 min · KKKZOZ

Rust Learning Note

Explore Rust Chapter 3 Types Arrays 不支持动态开数组: // an array of 100 int32 elements, all set to 1 let mut arr1 = [1;100]; // correct let n = 100; let mur arr2 = [1;c]; // error Vectors let mut arr = vec![0,6,4,8,1]; arr.sort() // increasing order arr.sort_by(|a,b| b.cmp(a)) // decreasing order If you know the number of elements a vector will need in advance, instead of Vec::new you can call Vec::with_capacity to create a vector with a buffer large enough to hold them all, right from the start. ...

February 10, 2024 · 46 min · KKKZOZ

Paper Note: Towards Transaction as a Service

Background Database systems have evolved to be with a cloud-native architecture,i.e., disaggregation of compute and storage architecture, which decouples the storage from the compute nodes, then connects the compute nodes to shared storage through a high-speed network. The principle of cloud-native architecture is decoupling. (decoupled functions to make good use of disaggregated resources) Most existing cloud-native databases couple TP either with storage layer or with execution layer. Coupling TP with Storage Layer TiDB adopts a distributed transactional key-value store TiKV as the storage layer. ...

January 22, 2024 · 6 min · KKKZOZ

A Piece Of: Go Tests

最近在写毕设项目时,总是发现有些单元测试在 VSCode 的 Testing Panel 连续运行测试时无法通过,但是单独运行时能正常通过,困扰了我好长一段时间。 有一次我发现了一个盲点: 在我写的框架中,有一个 config.go 文件: var Config = config{ LeaseTime: 1000 * time.Millisecond, MaxRecordLength: 2, IdGenerator: NewIncrementalGenerator(), Serializer: serializer.NewJSONSerializer(), LogLevel: zapcore.InfoLevel, } 当我从 Testing Panel 连续运行测试时,不同的测试都会复用 IdGenerator。 从网上查了资料后,才知道: The behavior you’re seeing is expected because Config is a global variable and it’s shared across the entire package. This means that state, such as the current ID from your NewIncrementalGenerator (), is preserved and reused across all your tests running within the same package. Go runs test functions (those starting with Test) in parallel by default, but within a single test package, they all share the same memory space. Therefore, global variables will persist their state across individual tests within that package. ...

January 21, 2024 · 1 min · KKKZOZ

Paper Note: Scalable Distributed Transactions across Heterogeneous Stores

FAQ What is the difference between rolling backward and rolling forward in database transactions? “Rolling backward” and “rolling forward” in the context of database transactions refer to two distinct phases of the recovery process that helps maintain the integrity and consistency of the database after a system crash or failure. These concepts are tied to the idea of transaction logs that record the changes made to the database. Below are the key differences between rolling backward and rolling forward: ...

December 9, 2023 · 5 min · KKKZOZ