Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to pebble v1.0.0 #337

Open
tylerwilliams opened this issue Dec 18, 2023 · 2 comments
Open

Upgrade to pebble v1.0.0 #337

tylerwilliams opened this issue Dec 18, 2023 · 2 comments

Comments

@tylerwilliams
Copy link
Contributor

Note: for reported bugs, please fill in the following details. bug reports without detailed steps on how to reproduce will be automatically closed.

Dragonboat version

Latest

Expected behavior

Builds against pebble v1.0.0

Actual behavior

Does not build:

# github.com/lni/dragonboat/v4/internal/vfs
internal/vfs/vfs.go:73:9: cannot use p.fs.Create(name) (value of type "github.com/lni/vfs".File) as "github.com/cockroachdb/pebble/vfs".File value in return statement: "github.com/lni/vfs".File does not implement "github.com/cockroachdb/pebble/vfs".File (missing method Fd)
internal/vfs/vfs.go:88:13: cannot use f (variable of type "github.com/lni/vfs".File) as "github.com/cockroachdb/pebble/vfs".File value in argument to opt.Apply: "github.com/lni/vfs".File does not implement "github.com/cockroachdb/pebble/vfs".File (missing method Fd)
internal/vfs/vfs.go:90:9: cannot use f (variable of type "github.com/lni/vfs".File) as "github.com/cockroachdb/pebble/vfs".File value in return statement: "github.com/lni/vfs".File does not implement "github.com/cockroachdb/pebble/vfs".File (missing method Fd)
internal/vfs/vfs.go:95:9: cannot use p.fs.OpenDir(name) (value of type "github.com/lni/vfs".File) as "github.com/cockroachdb/pebble/vfs".File value in return statement: "github.com/lni/vfs".File does not implement "github.com/cockroachdb/pebble/vfs".File (missing method Fd)
internal/vfs/vfs.go:115:9: cannot use p.fs.ReuseForWrite(oldname, newname) (value of type "github.com/lni/vfs".File) as "github.com/cockroachdb/pebble/vfs".File value in return statement: "github.com/lni/vfs".File does not implement "github.com/cockroachdb/pebble/vfs".File (missing method Fd)

Steps to reproduce the behavior

go get -u github.com/cockroachdb/pebble@v1.0.0
go build

I had a quick look at doing this myself but I think there are several changes required to lni/vfs. It would be great to get this in before releasing v4 so that a dragonboat depends on a more stable version of pebble.

@tylerwilliams
Copy link
Contributor Author

I had a go at this today when I had a few more minutes. The simplest thing seems to work; lni/vfs#3 implements the new interface in the VFS package and #339 fixes up a few small issues and uses the new VFS package.

LMK what you think.

@lni
Copy link
Owner

lni commented Dec 19, 2023

Very happy to see Pebble finally got itself a Go compatible module version number. Will look into it and merge all related PRs as long as they don't break other stuff.

Thanks for the PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants