Skip to content

Instantly share code, notes, and snippets.

View dkhenry's full-sized avatar

Daniel Kozlowski dkhenry

View GitHub Profile
#!/bin/bash
yum -y update
yum -y install jq docker
systemctl start docker
systemctl enable docker
packet-block-storage-attach -m queue
mount -t ext4 /dev/mapper/volume-14171d6f1 /data
/data/startup.sh
---
apiVersion: "planetscale.com/v1alpha1"
kind: "PsCluster"
metadata:
name: "example"
spec:
containers:
vtgate: "registry.planetscale.com/vitess/base:beta"
vttablet: "registry.planetscale.com/vitess/base:beta"
mysql: "registry.planetscale.com/vitess/base:beta"
@dkhenry
dkhenry / lockcheck.org
Created May 6, 2022 21:30
Why do we even have that lock

Row Level Locks Interacting with Gap Locks

Here is a simple example meant to show how a row level lock can conflict wiht a `gap lock` and cause unexpected locking behavour

Create the Base Schema

For this we will use a very basic schema a simple table with a timestmp and condition.

BEGIN;
CREATE TYPE ProcessStep AS ENUM('submitted','completed');
#!/usr/bin/env python3
import argparse
import random
import os
import subprocess
from math import gcd
from fractions import Fraction
# LaTeX template components