Skip to content

Instantly share code, notes, and snippets.

View arriqaaq's full-sized avatar
🎯
Focusing

Farhan arriqaaq

🎯
Focusing
View GitHub Profile
graph TD
    A[Start of a Transaction] --> B[Assign Read TS]
    B --> C[Reading from a Snapshot]
    C --> D[Perform Read Operation]
    D --> E{TS <= Read TS?}
    E -- Yes --> F[Return Committed Data]
    E -- No --> G[Ignore Uncommitted Data]
    A --> H[Writing with Snapshot Isolation]
    H --> I[Check Memtable for Conflicts]
---
IIP: 2
title: Data Retention in Immudb
author: Farhan Khan <farhan@codenotary.com>
status: Proposal
category: Storage
created: 2022-10-18
---
### Abstract
@arriqaaq
arriqaaq / truncaiton.md
Created February 13, 2023 03:46
Truncation Test Scenarios

Data Retention/Truncation Command Line Interface (CLI) Documentation

Introduction: The truncation command is an extention to the immuadmin CLI to perform data retention operations on a database. It supports parameters to specify the retention period and truncation frequency.

Usage: The CLI is invoked from the command line with the following syntax:

./immuadmin database create db [OPTIONS]
// Font is the flyweight object
type Font struct {
fontType string
fontSize int
fontColor string
}
// FontFactory is the flyweight factory
type FontFactory struct {
fonts map[string]*Font
package main
import (
"fmt"
"sync"
)
type Character struct {
Appearance string
Name string
package main
import (
"fmt"
"sync"
)
type RequestHandler struct {
sharedState string
}
package main
import (
"sync"
"time"
)
var objectPool = sync.Pool{
New: func() interface{} {
return time.Now()
package main
import (
"image"
"sync"
)
var imageCache = sync.Map{}
func getImage(path string) image.Image {
package main
import (
"database/sql"
"sync"
)
var connectionPool = sync.Pool{
New: func() interface{} {
db, _ := sql.Open("postgres", "user=postgres dbname=mydb sslmode=disable")
package main
import "fmt"
func main() {
s1 := "hello"
s2 := "hello"
fmt.Println(&s1 == &s2) // true
}