https://slatedb.io logo
slatedb/slatedb-go/go/db.go at main · sl...
# general
p
Hey, I’m evaluating slatedb for a project. The concept fits our use case well, we’re hoping to persist large numbers of small data inserts at high throughput. I’m using the golang bindings, but having some issues getting it running locally with minio. On linux it returns a generic error: https://github.com/slatedb/slatedb/blob/main/slatedb-go/go/db.go#L98 on osx the call to db.Open hangs. I tried attaching a debugger but it’s not able to step into the library function… just realised I should probably use the rust debug target instead of the release target
c
Hi! Can you please share your config? Id wager it's something pretty basic like an incorrect object store URL or something.
Definitely have people using the go bindings.
Also, what version are you running?
p
Using the head of main. Yeah probably a basic config issue just highlighting it's a bit tricky to debug
I had to make a small change to allow setting "allow_http" as that wasn't an option the go bindings expose
c
Yep this is an issue with the Amazon client
We have to do it for testing as well on local. HTTP
p
I have a branch that allows me to set HTTP and exposes the error through the Go bindings. Don't judge my Rust code 🙈 https://github.com/slatedb/slatedb/compare/main...patrobinson:slatedb:go-bindings-local-dev-fixes?expand=1 This is what I see, I did a packet capture and there's no requests going to that local port...
Copy code
panic: internal error: Unavailable error: object store error (Generic S3 error: Error performing list request: Error performing GET http://127.0.0.0:9000/bucket?list-type=2&prefix=tmp%2Fcache%2Fmanifest%2F in 88.466µs - HTTP error: builder error)
c
Mind sharing your code that creates the client and calls get/put? I can try and reproduce
p
I managed to replicate it in Rust without the go bindings https://gist.github.com/patrobinson/1bc23213293247ba9fae059dc687a147 Using the example from https://github.com/slatedb/slatedb/blob/main/examples/src/s3_compatible.rs works but the code from the go bindings (https://github.com/slatedb/slatedb/tree/main/slatedb-go/src) fails with that error
c
Awesome! Thanks for this. I’ll have a look today.
Probably something silly on our end
Attempting to replicate now
Ok, I ran your github gist and see it go into a loop of:
Copy code
2025-11-30T23:28:31.664611Z  INFO slatedb::retrying_object_store: retrying object store operation [error=Generic { store: "S3", source: ListRequest { source: RetryError(RetryErrorImpl { method: GET, uri: Some(http://localhost:9000/bucket?list-type=2&prefix=tmp%2Fslatedb_s3_compatible%2Fmanifest%2F), retries: 0, max_retries: 10, elapsed: 2.9885ms, retry_timeout: 180s, inner: Status { status: 404, body: Some("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>NoSuchBucket</Code><Message>The specified bucket does not exist</Message><BucketName>bucket</BucketName><Resource>/bucket</Resource><RequestId>187CEC9CABC1D4E0</RequestId><HostId>dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8</HostId></Error>") } }) } }, duration=800.000012ms]
This obviously makes sense because the bucket doesn't exist (i didn't create a bucket called
bucket
). I want to verify: you have a bucket that exists, right?
I added
bucket
as a bucket to minio.. now I see a loop of:
Copy code
2025-11-30T23:29:25.974823Z  INFO slatedb::retrying_object_store: retrying object store operation [error=Generic { store: "S3", source: ListRequest { source: RetryError(RetryErrorImpl { method: GET, uri: Some(http://localhost:9000/bucket?list-type=2&prefix=tmp%2Fcache%2Fmanifest%2F), retries: 0, max_retries: 10, elapsed: 168.834µs, retry_timeout: 180s, inner: Http(HttpError { kind: Unknown, source: reqwest::Error { kind: Builder, source: BadScheme } }) }) } }, duration=800.000012ms]
Which is probably what you're seeing?
p
Yep i did make a bucket
That looks similar to the error i saw
c
I suspect it's 'cuz of this: } .with_client_options(client_options);
That's happening after the with_allow_http, which I think will overwrite
lemme try
Yep, that fixed it
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out; finished in 0.99s
Copy code
let client_options = ClientOptions::new();
    let mut builder = AmazonS3Builder::new()
        .with_bucket_name("bucket")
        .with_region("us-east-1")
        .with_conditional_put(S3ConditionalPut::ETagMatch)
        .with_client_options(client_options)
        .with_allow_http(true); // <--- _AFTER_ with_client_options

    builder = builder.with_endpoint("http://localhost:9000");
    builder = builder
        .with_access_key_id("minioadmin")
        .with_secret_access_key("minioadmin");
Try that and LMK if you hit any other snags
p
Sweet thanks for the help! I’ll test it shortly
That works, I made a PR with the changes https://github.com/slatedb/slatedb/pull/1056
p
My original issue has already been fixed upstream now 🤣 I'll remove that change and just leave the error propagation