https://slatedb.io logo
👋 newer to SlateDB and testing/deploying our sec...
# general
b
👋 newer to SlateDB and testing/deploying our second real use case! We hit some
Fenced
error in a call
db.scan
for a new use case we're testing, and I'm trying to understand what scenario could have caused this 🤔 . Context: our use case involves a small sidecar rust GRPC service which wraps the SlateDB library. Each sidecar service is assigned a unique object store path prefix which serves as intermediate state storage for a workflow run. The workflow logic is written in typescript and calls our to this sidecar GRPC service to read and write state. Any pointers or thoughts would be really appreciated! Haven't really explored the internals of SlateDB deeply..
r
Welcome! SlateDB is single-writer, so generally this means that some other process has come on line and tried to claim write-ownership of the db instance. The mechanism for doing this is to update an epoch in the slatedb's manifest object. In your case, any chance that different sidecar instances are stomping on each other's db instance (e.g. maybe they're misconfigured to use the same root path)?
b
We receive the error during a read operation, a
db.scan
? Generally I don't expect that another process came along and claimed it, each sidecar is assigned a unique prefix based upon the workload's unique ID which is UUIDv7 based and assigned via a centralized control plane. This prefix governs the path in the object store that the db instance points at Potentially there could have been process crash and restart, or some race within the service but that would be definitely unexpected scenario..
If I have a second process which is intended to be "readonly" do I have to open using DbReader rather than Db to ensure that the concurrent writer doesn't get fenced? Even if the second process never makes a 'put' ?
r
> If I have a second process which is intended to be "readonly" do I have to open using DbReader rather than Db to ensure that the concurrent writer doesn't get fenced? Even if the second process never makes a 'put' ? yes. Db always tries to take over the db as a writer, when the db is opened. If you are only doing reads, use DbReader