Skip to content

Commit

Permalink
pebble-release-2.0: change path to v2
Browse files Browse the repository at this point in the history
A go module with version `v2.0` must have a path that ends in `/v2`;
otherwise `go get` gives you a "module path must match major version"
error.

This commit enacts this change for the `pebble-release-2.0` branch. In
the future we will consider making this change on master as well so we
don't have inconsistency between the branches.

Fixes #4271
  • Loading branch information
RaduBerinde committed Jan 22, 2025
1 parent 0a3b621 commit f5d747d
Show file tree
Hide file tree
Showing 412 changed files with 1,651 additions and 1,651 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ gen-bazel:
@echo "Generating WORKSPACE"
@echo 'workspace(name = "com_github_cockroachdb_pebble")' > WORKSPACE
@echo 'Running gazelle...'
${GO} run github.com/bazelbuild/bazel-gazelle/cmd/[email protected] update --go_prefix=github.com/cockroachdb/pebble --repo_root=.
${GO} run github.com/bazelbuild/bazel-gazelle/cmd/[email protected] update --go_prefix=github.com/cockroachdb/pebble/v2 --repo_root=.
@echo 'You should now be able to build Cockroach using:'
@echo ' ./dev build short -- --override_repository=com_github_cockroachdb_pebble=${CURDIR}'

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Pebble [![Build Status](https://github.com/cockroachdb/pebble/actions/workflows/ci.yaml/badge.svg?branch=master)](https://github.com/cockroachdb/pebble/actions/workflows/ci.yaml) [![GoDoc](https://godoc.org/github.com/cockroachdb/pebble?status.svg)](https://godoc.org/github.com/cockroachdb/pebble) <sup><sub><sub>[Coverage](https://storage.googleapis.com/crl-codecover-public/pebble/index.html)</sub></sub></sup>
# Pebble [![Build Status](https://github.com/cockroachdb/pebble/v2/actions/workflows/ci.yaml/badge.svg?branch=master)](https://github.com/cockroachdb/pebble/v2/actions/workflows/ci.yaml) [![GoDoc](https://godoc.org/github.com/cockroachdb/pebble/v2?status.svg)](https://godoc.org/github.com/cockroachdb/pebble/v2) <sup><sub><sub>[Coverage](https://storage.googleapis.com/crl-codecover-public/pebble/index.html)</sub></sub></sup>

#### [Nightly benchmarks](https://cockroachdb.github.io/pebble/)

Expand Down Expand Up @@ -118,7 +118,7 @@ incompatibilities.
* SSTable format version 3 and 4. Pebble does not support version 3
and version 4 format sstables. The sstable format version is
controlled by the `BlockBasedTableOptions::format_version` option.
See [#97](https://github.com/cockroachdb/pebble/issues/97).
See [#97](https://github.com/cockroachdb/pebble/v2/issues/97).

## Format major versions

Expand All @@ -134,11 +134,11 @@ to a compatible format major version before running newer Pebble versions. Newer
Pebble versions will refuse to open databases in no longer supported formats.

To opt into new formats, a user may set `FormatMajorVersion` on the
[`Options`](https://pkg.go.dev/github.com/cockroachdb/pebble#Options)
[`Options`](https://pkg.go.dev/github.com/cockroachdb/pebble/v2#Options)
supplied to
[`Open`](https://pkg.go.dev/github.com/cockroachdb/pebble#Open), or
[`Open`](https://pkg.go.dev/github.com/cockroachdb/pebble/v2#Open), or
upgrade the format major version at runtime using
[`DB.RatchetFormatMajorVersion`](https://pkg.go.dev/github.com/cockroachdb/pebble#DB.RatchetFormatMajorVersion).
[`DB.RatchetFormatMajorVersion`](https://pkg.go.dev/github.com/cockroachdb/pebble/v2#DB.RatchetFormatMajorVersion).
Format major version upgrades are permanent; There is no option to
return to an earlier format.

Expand Down Expand Up @@ -180,7 +180,7 @@ property collectors, the `pebble` tool can also be used, at the latest version
that supports the format. For example:
```
# WARNING: only use if no custom comparer/merger/property collector are necessary.
go run github.com/cockroachdb/pebble/cmd/[email protected] db upgrade <db-dir>
go run github.com/cockroachdb/pebble/v2/cmd/[email protected] db upgrade <db-dir>
```

For reference, the table below lists the range of supported Pebble format major
Expand Down Expand Up @@ -224,7 +224,7 @@ import (
"fmt"
"log"

"github.com/cockroachdb/pebble"
"github.com/cockroachdb/pebble/v2"
)

func main() {
Expand Down
22 changes: 11 additions & 11 deletions batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ import (
"unsafe"

"github.com/cockroachdb/errors"
"github.com/cockroachdb/pebble/batchrepr"
"github.com/cockroachdb/pebble/internal/base"
"github.com/cockroachdb/pebble/internal/batchskl"
"github.com/cockroachdb/pebble/internal/humanize"
"github.com/cockroachdb/pebble/internal/invariants"
"github.com/cockroachdb/pebble/internal/keyspan"
"github.com/cockroachdb/pebble/internal/private"
"github.com/cockroachdb/pebble/internal/rangedel"
"github.com/cockroachdb/pebble/internal/rangekey"
"github.com/cockroachdb/pebble/internal/rawalloc"
"github.com/cockroachdb/pebble/internal/treeprinter"
"github.com/cockroachdb/pebble/v2/batchrepr"
"github.com/cockroachdb/pebble/v2/internal/base"
"github.com/cockroachdb/pebble/v2/internal/batchskl"
"github.com/cockroachdb/pebble/v2/internal/humanize"
"github.com/cockroachdb/pebble/v2/internal/invariants"
"github.com/cockroachdb/pebble/v2/internal/keyspan"
"github.com/cockroachdb/pebble/v2/internal/private"
"github.com/cockroachdb/pebble/v2/internal/rangedel"
"github.com/cockroachdb/pebble/v2/internal/rangekey"
"github.com/cockroachdb/pebble/v2/internal/rawalloc"
"github.com/cockroachdb/pebble/v2/internal/treeprinter"
)

const (
Expand Down
16 changes: 8 additions & 8 deletions batch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ import (

"github.com/cockroachdb/datadriven"
"github.com/cockroachdb/errors"
"github.com/cockroachdb/pebble/batchrepr"
"github.com/cockroachdb/pebble/internal/base"
"github.com/cockroachdb/pebble/internal/batchskl"
"github.com/cockroachdb/pebble/internal/datadrivenutil"
"github.com/cockroachdb/pebble/internal/itertest"
"github.com/cockroachdb/pebble/internal/keyspan"
"github.com/cockroachdb/pebble/internal/testkeys"
"github.com/cockroachdb/pebble/vfs"
"github.com/cockroachdb/pebble/v2/batchrepr"
"github.com/cockroachdb/pebble/v2/internal/base"
"github.com/cockroachdb/pebble/v2/internal/batchskl"
"github.com/cockroachdb/pebble/v2/internal/datadrivenutil"
"github.com/cockroachdb/pebble/v2/internal/itertest"
"github.com/cockroachdb/pebble/v2/internal/keyspan"
"github.com/cockroachdb/pebble/v2/internal/testkeys"
"github.com/cockroachdb/pebble/v2/vfs"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion batchrepr/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"fmt"
"unsafe"

"github.com/cockroachdb/pebble/internal/base"
"github.com/cockroachdb/pebble/v2/internal/base"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion batchrepr/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package batchrepr
import (
"encoding/binary"

"github.com/cockroachdb/pebble/internal/base"
"github.com/cockroachdb/pebble/v2/internal/base"
)

// SetSeqNum mutates the provided batch representation, storing the provided
Expand Down
4 changes: 2 additions & 2 deletions batchrepr/writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"testing"

"github.com/cockroachdb/datadriven"
"github.com/cockroachdb/pebble/internal/base"
"github.com/cockroachdb/pebble/internal/binfmt"
"github.com/cockroachdb/pebble/v2/internal/base"
"github.com/cockroachdb/pebble/v2/internal/binfmt"
)

func TestWriter(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions bloom/bloom.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
// the LICENSE file.

// Package bloom implements Bloom filters.
package bloom // import "github.com/cockroachdb/pebble/bloom"
package bloom // import "github.com/cockroachdb/pebble/v2/bloom"

import (
"encoding/binary"
"fmt"
"sync"

"github.com/cockroachdb/pebble/internal/base"
"github.com/cockroachdb/pebble/v2/internal/base"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion bloom/bloom_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"testing"

"github.com/cockroachdb/pebble/internal/base"
"github.com/cockroachdb/pebble/v2/internal/base"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

package pebble

import "github.com/cockroachdb/pebble/internal/cache"
import "github.com/cockroachdb/pebble/v2/internal/cache"

// Cache exports the cache.Cache type.
type Cache = cache.Cache
Expand Down
10 changes: 5 additions & 5 deletions checkpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (

"github.com/cockroachdb/errors"
"github.com/cockroachdb/errors/oserror"
"github.com/cockroachdb/pebble/internal/base"
"github.com/cockroachdb/pebble/record"
"github.com/cockroachdb/pebble/vfs"
"github.com/cockroachdb/pebble/vfs/atomicfs"
"github.com/cockroachdb/pebble/wal"
"github.com/cockroachdb/pebble/v2/internal/base"
"github.com/cockroachdb/pebble/v2/record"
"github.com/cockroachdb/pebble/v2/vfs"
"github.com/cockroachdb/pebble/v2/vfs/atomicfs"
"github.com/cockroachdb/pebble/v2/wal"
)

// checkpointOptions hold the optional parameters to construct checkpoint
Expand Down
6 changes: 3 additions & 3 deletions checkpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (
"testing"

"github.com/cockroachdb/datadriven"
"github.com/cockroachdb/pebble/internal/base"
"github.com/cockroachdb/pebble/objstorage/remote"
"github.com/cockroachdb/pebble/vfs"
"github.com/cockroachdb/pebble/v2/internal/base"
"github.com/cockroachdb/pebble/v2/objstorage/remote"
"github.com/cockroachdb/pebble/v2/vfs"
"github.com/stretchr/testify/require"
)

Expand Down
14 changes: 7 additions & 7 deletions cmd/pebble/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ package main
import (
"log"

"github.com/cockroachdb/pebble"
"github.com/cockroachdb/pebble/bloom"
"github.com/cockroachdb/pebble/internal/bytealloc"
"github.com/cockroachdb/pebble/internal/crdbtest"
"github.com/cockroachdb/pebble/objstorage/remote"
"github.com/cockroachdb/pebble/sstable"
"github.com/cockroachdb/pebble/vfs"
"github.com/cockroachdb/pebble/v2"
"github.com/cockroachdb/pebble/v2/bloom"
"github.com/cockroachdb/pebble/v2/internal/bytealloc"
"github.com/cockroachdb/pebble/v2/internal/crdbtest"
"github.com/cockroachdb/pebble/v2/objstorage/remote"
"github.com/cockroachdb/pebble/v2/sstable"
"github.com/cockroachdb/pebble/v2/vfs"
)

// DB specifies the minimal interfaces that need to be implemented to support
Expand Down
2 changes: 1 addition & 1 deletion cmd/pebble/fsbench.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"

"github.com/cockroachdb/errors"
"github.com/cockroachdb/pebble/vfs"
"github.com/cockroachdb/pebble/v2/vfs"
"github.com/spf13/cobra"
)

Expand Down
12 changes: 6 additions & 6 deletions cmd/pebble/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"os"
"time"

"github.com/cockroachdb/pebble"
"github.com/cockroachdb/pebble/internal/base"
"github.com/cockroachdb/pebble/internal/crdbtest"
"github.com/cockroachdb/pebble/internal/testkeys"
"github.com/cockroachdb/pebble/sstable/colblk"
"github.com/cockroachdb/pebble/tool"
"github.com/cockroachdb/pebble/v2"
"github.com/cockroachdb/pebble/v2/internal/base"
"github.com/cockroachdb/pebble/v2/internal/crdbtest"
"github.com/cockroachdb/pebble/v2/internal/testkeys"
"github.com/cockroachdb/pebble/v2/sstable/colblk"
"github.com/cockroachdb/pebble/v2/tool"
"github.com/spf13/cobra"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/pebble/mvcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ package main
import (
"bytes"

"github.com/cockroachdb/pebble"
"github.com/cockroachdb/pebble/internal/bytealloc"
"github.com/cockroachdb/pebble/internal/crdbtest"
"github.com/cockroachdb/pebble/v2"
"github.com/cockroachdb/pebble/v2/internal/bytealloc"
"github.com/cockroachdb/pebble/v2/internal/crdbtest"
)

// MVCC routines adapted from CockroachDB sources. Used to perform
Expand Down
6 changes: 3 additions & 3 deletions cmd/pebble/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"sync/atomic"
"time"

"github.com/cockroachdb/pebble"
"github.com/cockroachdb/pebble/internal/crdbtest"
"github.com/cockroachdb/pebble/internal/randvar"
"github.com/cockroachdb/pebble/v2"
"github.com/cockroachdb/pebble/v2/internal/crdbtest"
"github.com/cockroachdb/pebble/v2/internal/randvar"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/pebble/random.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"time"

"github.com/cockroachdb/errors"
"github.com/cockroachdb/pebble/internal/randvar"
"github.com/cockroachdb/pebble/internal/rate"
"github.com/cockroachdb/pebble/v2/internal/randvar"
"github.com/cockroachdb/pebble/v2/internal/rate"
)

type rateFlag struct {
Expand Down
14 changes: 7 additions & 7 deletions cmd/pebble/replay.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ import (
"unicode"

"github.com/cockroachdb/errors"
"github.com/cockroachdb/pebble"
"github.com/cockroachdb/pebble/bloom"
"github.com/cockroachdb/pebble/internal/base"
"github.com/cockroachdb/pebble/internal/cache"
"github.com/cockroachdb/pebble/internal/crdbtest"
"github.com/cockroachdb/pebble/replay"
"github.com/cockroachdb/pebble/vfs"
"github.com/cockroachdb/pebble/v2"
"github.com/cockroachdb/pebble/v2/bloom"
"github.com/cockroachdb/pebble/v2/internal/base"
"github.com/cockroachdb/pebble/v2/internal/cache"
"github.com/cockroachdb/pebble/v2/internal/crdbtest"
"github.com/cockroachdb/pebble/v2/replay"
"github.com/cockroachdb/pebble/v2/vfs"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/pebble/replay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"fmt"
"testing"

"github.com/cockroachdb/pebble"
"github.com/cockroachdb/pebble/internal/cache"
"github.com/cockroachdb/pebble/v2"
"github.com/cockroachdb/pebble/v2/internal/cache"
"github.com/stretchr/testify/require"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/pebble/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"sync/atomic"
"time"

"github.com/cockroachdb/pebble"
"github.com/cockroachdb/pebble/internal/crdbtest"
"github.com/cockroachdb/pebble/internal/randvar"
"github.com/cockroachdb/pebble/v2"
"github.com/cockroachdb/pebble/v2/internal/crdbtest"
"github.com/cockroachdb/pebble/v2/internal/randvar"
"github.com/spf13/cobra"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/pebble/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"sync/atomic"
"time"

"github.com/cockroachdb/pebble"
"github.com/cockroachdb/pebble/internal/crdbtest"
"github.com/cockroachdb/pebble/internal/randvar"
"github.com/cockroachdb/pebble/v2"
"github.com/cockroachdb/pebble/v2/internal/crdbtest"
"github.com/cockroachdb/pebble/v2/internal/randvar"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/pebble/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"time"

"github.com/HdrHistogram/hdrhistogram-go"
"github.com/cockroachdb/pebble"
"github.com/cockroachdb/pebble/v2"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cmd/pebble/tombstone.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"

"github.com/cockroachdb/errors"
"github.com/cockroachdb/pebble/internal/humanize"
"github.com/cockroachdb/pebble/v2/internal/humanize"
"github.com/spf13/cobra"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/pebble/write_bench.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"sync"
"time"

"github.com/cockroachdb/pebble/internal/ackseq"
"github.com/cockroachdb/pebble/internal/randvar"
"github.com/cockroachdb/pebble/internal/rate"
"github.com/cockroachdb/pebble/v2/internal/ackseq"
"github.com/cockroachdb/pebble/v2/internal/randvar"
"github.com/cockroachdb/pebble/v2/internal/rate"
"github.com/spf13/cobra"
)

Expand Down
8 changes: 4 additions & 4 deletions cmd/pebble/ycsb.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
"time"

"github.com/cockroachdb/errors"
"github.com/cockroachdb/pebble"
"github.com/cockroachdb/pebble/internal/ackseq"
"github.com/cockroachdb/pebble/internal/randvar"
"github.com/cockroachdb/pebble/internal/rate"
"github.com/cockroachdb/pebble/v2"
"github.com/cockroachdb/pebble/v2/internal/ackseq"
"github.com/cockroachdb/pebble/v2/internal/randvar"
"github.com/cockroachdb/pebble/v2/internal/rate"
"github.com/spf13/cobra"
)

Expand Down
Loading

0 comments on commit f5d747d

Please sign in to comment.