SNAPSHOT ISOLATION IN COCKROACHDB

CockroachDB is a popular database that is currently in operation in several companies today. However, the CockroachDB today only has a single isolation level, which is serializable. CockroachDB used to have a lower level of isolation, specifically snapshot isolation. Using snapshot isolation, Cockro...

Full description

Saved in:
Bibliographic Details
Main Author: James Wang, Leonardus
Format: Final Project
Language:Indonesia
Online Access:https://digilib.itb.ac.id/gdl/view/76670
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Institut Teknologi Bandung
Language: Indonesia
Description
Summary:CockroachDB is a popular database that is currently in operation in several companies today. However, the CockroachDB today only has a single isolation level, which is serializable. CockroachDB used to have a lower level of isolation, specifically snapshot isolation. Using snapshot isolation, CockroachDB should run faster in a certain case. This paper shows snapshot isolation is faster than serializable for CockroachDB. The general research flow to find out which case is snapshot isolation faster than serializable and how significant the difference between the both of them are as follows. First, the difference between serializable and snapshot isolation in CockroachDB as well as the general architecture of CockroachDB will be studied. The benchmarks to be used are then chosen based on those studies, and the expected results of the benchmarks are defined. Next, the driver for cockroachDB for each benchmark is implemented, and then the tests are ran. Lastly, the results are analyzed, and the conclusions are drawn. The benchmarks chosen for this experiment are TPC-C and SIBench. However, although a benchmark for measuring snapshot isolation against serializable exists (SIBench), the case where snapshot isolation is significantly faster than serializable doesn’t exist yet. Specifically, the case is where there’s lots of write skews, or false positives for said write skews. Thus, a new benchmark called FPMicrobenchmark is made for this specific case. Using TPC-C, SIBench and FPMicrobenchmark, it’s concluded that while for general usage, the difference between the 2 isolation levels aren’t significant. However, for the specific case, the difference between the 2 isolation levels is quite significant. In particular, in a system where there are lots of write skews or false positives for write skews, snapshot isolation is 20% faster than serializable