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]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
IIP: 2 | |
title: Data Retention in Immudb | |
author: Farhan Khan <[email protected]> | |
status: Proposal | |
category: Storage | |
created: 2022-10-18 | |
--- | |
### Abstract |
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]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
type Character struct { | |
Appearance string | |
Name string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
type RequestHandler struct { | |
sharedState string | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"sync" | |
"time" | |
) | |
var objectPool = sync.Pool{ | |
New: func() interface{} { | |
return time.Now() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"image" | |
"sync" | |
) | |
var imageCache = sync.Map{} | |
func getImage(path string) image.Image { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"database/sql" | |
"sync" | |
) | |
var connectionPool = sync.Pool{ | |
New: func() interface{} { | |
db, _ := sql.Open("postgres", "user=postgres dbname=mydb sslmode=disable") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func main() { | |
s1 := "hello" | |
s2 := "hello" | |
fmt.Println(&s1 == &s2) // true | |
} |
NewerOlder