Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

Releases: guycipher/k4

K4 v2.1.8

Choose a tag to compare

@guycipher guycipher released this 12 Nov 20:43

K4 v2.1.8 PATCH BREAKING

  • We replaced gob with a custom encoding an decoding implementation for KeyValue and Operation structures. We did this as gob was causing very large file sizes and using lots of memory. These new methods should assist in these issues. encodeKV, decodeKV, encodeOp, decodeOp are the new methods, replacing previous serializeKv, deserializeKv, serializeOp, deserializeOp. In v2.1.6 and v2.1.7 it was found on flush of memtables to disk a 90mb memtable could resolve to almost 1gb.

K4 v2.1.7

Choose a tag to compare

@guycipher guycipher released this 12 Nov 19:45

K4 v2.1.7 PATCH BREAKING

As discussed here #25

  • Corrected memtable size incrementation
  • Modified pager to use less space changing page body size to 1024 and header size to 16. Thus every page now takes 1040 bytes as opposed to 4156.

Thank you @marvin-j97 for the issue reporting and testing you concluded. Good stuff.

K4 v2.1.6

Choose a tag to compare

@guycipher guycipher released this 10 Nov 03:35

K4 v2.1.6 PATCH

This is a long term stable release.

  • Bump go mods to go version 1.23.3
  • Code clean up and commenting wherever need be

K4 v2.1.5

Choose a tag to compare

@guycipher guycipher released this 09 Nov 20:08

K4 v2.1.5 PATCH

  • New public EscalateFlush() and EscalateCompaction() methods.
  • Skiplist Size() method to take into account node TTL.
  • On checks if memtable has reached threshold changed operator from > to >=.

K4 v2.1.4

Choose a tag to compare

@guycipher guycipher released this 09 Nov 16:22

K4 v2.1.4 PATCH BREAKING

  • Replaced bloom filter with optimized cuckoo filter for faster reads. The cuckoo filter entries contain non hashes prefixes which are the page numbers for the location of the actual key value pair within the paged sstable.

K4 v2.1.3

Choose a tag to compare

@guycipher guycipher released this 09 Nov 04:34

K4 v2.1.3 PATCH BREAKING

  • Corrections on index bloom filter.

K4 v2.1.2

Choose a tag to compare

@guycipher guycipher released this 09 Nov 03:39

K4 v2.1.2 PATCH BREAKING

  • New bloom filter implementation that also stores page indexes for a key for faster read accesses.

K4 v1.9.7

Choose a tag to compare

@guycipher guycipher released this 05 Nov 20:51

K4 v1.9.7 PATCH

  • On closure of pager escalate write sync.

K4 v1.9.6

Choose a tag to compare

@guycipher guycipher released this 05 Nov 20:32

K4 v1.9.6 PATCH

  • Update to pager which is used for WAL, and SSTables to periodically sync to disk.

New pager constants

const SYNC_TICK_INTERVAL = 1 * time.Second // tick interval for syncing the file
const SYNC_ESCALATION = 1 * time.Minute    // if the file is not synced in 1 minute, sync it
const WRITE_THRESHOLD = 24576              // every 24576 writes, sync the file

New periodic sync method

func (p *Pager) startPeriodicSync() {
	defer p.wg.Done()

	p.once.Do(func() {

		ticker := time.NewTicker(SYNC_TICK_INTERVAL)
		defer ticker.Stop()
		for {
			select {
			case <-ticker.C:
				if p.writeCounter < WRITE_THRESHOLD {
					if time.Since(p.lastSync) < SYNC_ESCALATION { // check if the file is synced in SYNC_ESCALATION
						continue
					} // if the file is not synced in SYNC_ESCALATION, sync it

				}
				err := p.file.Sync()
				if err != nil {
					return
				}
				p.lock.Lock()
				p.writeCounter = 0
				p.lastSync = time.Now()
				p.lock.Unlock()
			case <-p.stopSync:
				return
			}
		}
	})
}

2bc1ab4

Reddit discussion
https://www.reddit.com/r/databasedevelopment/comments/1gk18nd/comment/lvkomdj/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

K4 v1.9.5

Choose a tag to compare

@guycipher guycipher released this 05 Nov 08:59

K4 v1.9.5 PATCH

  • Bumping version as we were gonna go to version 2 but refrained from it as we did not want to change project structure. The package at pkg.go.dev was referring to an old repository so we are bumping to v1.9.5 to fix this.