shardwidth

package
v3.35.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2023 License: Apache-2.0, Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const Exponent = 20

Exponent controls the size of each shard

# Warnings - changing this value WILL corrupt any data sets created with a different value - both server and client must be compiled with the same Exponent

Variables

This section is empty.

Functions

func FindNextShard

func FindNextShard(i int, haystack []uint64) int

FindNextShard returns the index of the first item which is not in the same shard as i. The index it returns may be equal to the length of the haystack, indicatincg that the rest of the list is in the same shard.

func FindShards

func FindShards(haystack []uint64) (shards []uint64, endIndexes []int)

FindShards finds the shards in a given haystack

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL