Merge branch 'master' into chore/gh2181/release-builds

This commit is contained in:
Christopher Lowenthal 2022-10-25 13:31:11 -04:00
commit a03462d498
20 changed files with 9 additions and 139 deletions

View file

@ -56,4 +56,4 @@ jobs:
# - uses: actions/upload-artifact@v3
# with:
# name: ingest-${{ matrix.goos }}-${{ matrix.goarch }}
# path: ./build/ingest-${{ matrix.goos }}-${{ matrix.goarch }}
# path: ./build/ingest-${{ matrix.goos }}-${{ matrix.goarch }}

View file

@ -10,12 +10,11 @@ VERSION_ID=$(if $(TRIAL_DEADLINE),trial-$(TRIAL_DEADLINE)-,)$(VERSION)-$(GOOS)-$
BRANCH := $(if $(CIRCLE_BRANCH),$(CIRCLE_BRANCH),$(shell git rev-parse --abbrev-ref HEAD))
BRANCH_ID := $(BRANCH)-$(GOOS)-$(GOARCH)
BUILD_TIME := $(shell date -u +%FT%T%z)
SHARD_WIDTH = 20
COMMIT := $(shell git describe --exact-match >/dev/null 2>&1 || git rev-parse --short HEAD)
LDFLAGS="-X github.com/featurebasedb/featurebase/v3.Version=$(VERSION) -X github.com/featurebasedb/featurebase/v3.BuildTime=$(BUILD_TIME) -X github.com/featurebasedb/featurebase/v3.Variant=$(VARIANT) -X github.com/featurebasedb/featurebase/v3.Commit=$(COMMIT) -X github.com/featurebasedb/featurebase/v3.TrialDeadline=$(TRIAL_DEADLINE)"
GO_VERSION=1.19
DOCKER_BUILD= # set to 1 to use `docker-build` instead of `build` when creating a release
BUILD_TAGS += shardwidth$(SHARD_WIDTH)
BUILD_TAGS +=
TEST_TAGS = roaringparanoia
UNAME := $(shell uname -s)
TEST_TIMEOUT=10m

View file

@ -1,8 +0,0 @@
// Copyright 2022 Molecula Corp. (DBA FeatureBase).
// SPDX-License-Identifier: Apache-2.0
//go:build shardwidth16
// +build shardwidth16
package shardwidth
const Exponent = 16

View file

@ -1,8 +0,0 @@
// Copyright 2022 Molecula Corp. (DBA FeatureBase).
// SPDX-License-Identifier: Apache-2.0
//go:build shardwidth17
// +build shardwidth17
package shardwidth
const Exponent = 17

View file

@ -1,8 +0,0 @@
// Copyright 2022 Molecula Corp. (DBA FeatureBase).
// SPDX-License-Identifier: Apache-2.0
//go:build shardwidth18
// +build shardwidth18
package shardwidth
const Exponent = 18

View file

@ -1,8 +0,0 @@
// Copyright 2022 Molecula Corp. (DBA FeatureBase).
// SPDX-License-Identifier: Apache-2.0
//go:build shardwidth19
// +build shardwidth19
package shardwidth
const Exponent = 19

View file

@ -1,8 +0,0 @@
// Copyright 2022 Molecula Corp. (DBA FeatureBase).
// SPDX-License-Identifier: Apache-2.0
//go:build !shardwidth16 && !shardwidth17 && !shardwidth18 && !shardwidth19 && !shardwidth21 && !shardwidth22 && !shardwidth23 && !shardwidth24 && !shardwidth25 && !shardwidth26 && !shardwidth27 && !shardwidth28 && !shardwidth29 && !shardwidth30 && !shardwidth31 && !shardwidth32
// +build !shardwidth16,!shardwidth17,!shardwidth18,!shardwidth19,!shardwidth21,!shardwidth22,!shardwidth23,!shardwidth24,!shardwidth25,!shardwidth26,!shardwidth27,!shardwidth28,!shardwidth29,!shardwidth30,!shardwidth31,!shardwidth32
package shardwidth
const Exponent = 20

View file

@ -1,8 +0,0 @@
// Copyright 2022 Molecula Corp. (DBA FeatureBase).
// SPDX-License-Identifier: Apache-2.0
//go:build shardwidth21
// +build shardwidth21
package shardwidth
const Exponent = 21

View file

@ -1,8 +0,0 @@
// Copyright 2022 Molecula Corp. (DBA FeatureBase).
// SPDX-License-Identifier: Apache-2.0
//go:build shardwidth22
// +build shardwidth22
package shardwidth
const Exponent = 22

View file

@ -1,8 +0,0 @@
// Copyright 2022 Molecula Corp. (DBA FeatureBase).
// SPDX-License-Identifier: Apache-2.0
//go:build shardwidth23
// +build shardwidth23
package shardwidth
const Exponent = 23

View file

@ -1,8 +0,0 @@
// Copyright 2022 Molecula Corp. (DBA FeatureBase).
// SPDX-License-Identifier: Apache-2.0
//go:build shardwidth24
// +build shardwidth24
package shardwidth
const Exponent = 24

View file

@ -1,8 +0,0 @@
// Copyright 2022 Molecula Corp. (DBA FeatureBase).
// SPDX-License-Identifier: Apache-2.0
//go:build shardwidth25
// +build shardwidth25
package shardwidth
const Exponent = 25

View file

@ -1,8 +0,0 @@
// Copyright 2022 Molecula Corp. (DBA FeatureBase).
// SPDX-License-Identifier: Apache-2.0
//go:build shardwidth26
// +build shardwidth26
package shardwidth
const Exponent = 26

View file

@ -1,8 +0,0 @@
// Copyright 2022 Molecula Corp. (DBA FeatureBase).
// SPDX-License-Identifier: Apache-2.0
//go:build shardwidth27
// +build shardwidth27
package shardwidth
const Exponent = 27

View file

@ -1,8 +0,0 @@
// Copyright 2022 Molecula Corp. (DBA FeatureBase).
// SPDX-License-Identifier: Apache-2.0
//go:build shardwidth28
// +build shardwidth28
package shardwidth
const Exponent = 28

View file

@ -1,8 +0,0 @@
// Copyright 2022 Molecula Corp. (DBA FeatureBase).
// SPDX-License-Identifier: Apache-2.0
//go:build shardwidth29
// +build shardwidth29
package shardwidth
const Exponent = 29

View file

@ -1,8 +0,0 @@
// Copyright 2022 Molecula Corp. (DBA FeatureBase).
// SPDX-License-Identifier: Apache-2.0
//go:build shardwidth30
// +build shardwidth30
package shardwidth
const Exponent = 30

View file

@ -1,8 +0,0 @@
// Copyright 2022 Molecula Corp. (DBA FeatureBase).
// SPDX-License-Identifier: Apache-2.0
//go:build shardwidth31
// +build shardwidth31
package shardwidth
const Exponent = 31

View file

@ -1,8 +0,0 @@
// Copyright 2022 Molecula Corp. (DBA FeatureBase).
// SPDX-License-Identifier: Apache-2.0
//go:build shardwidth32
// +build shardwidth32
package shardwidth
const Exponent = 32

View file

@ -6,6 +6,13 @@ import (
"math/bits"
)
// 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
const Exponent = 20
// 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.