Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
## [0.12.1] - 2025-10-03

### 🐛 Bug Fixes

- Replace cuckoo filter with bloom
## [0.12.0] - 2025-09-24

### 🐛 Bug Fixes

- Added fossa CI workflow

### ⚙️ Miscellaneous Tasks

- Release
## [0.11.10-rc.2] - 2025-09-18

### 🐛 Bug Fixes
Expand Down
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["crates/*"]
resolver = "2"

[workspace.package]
version = "0.12.0"
version = "0.12.1"
edition = "2021"
publish = false
authors = ["FastEdge Development Team"]
Expand Down
10 changes: 5 additions & 5 deletions crates/key-value-store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub trait Store: Sync + Send {

async fn zscan(&self, key: &str, pattern: &str) -> Result<Vec<(Value, f64)>, Error>;

async fn cf_exists(&self, key: &str, item: &str) -> Result<bool, Error>;
async fn bf_exists(&self, key: &str, item: &str) -> Result<bool, Error>;
}

#[async_trait::async_trait]
Expand Down Expand Up @@ -85,14 +85,14 @@ impl key_value::HostStore for KeyValueStore {
KeyValueStore::zscan(self, store_id, &key, &pattern).await
}

async fn cf_exists(
async fn bf_exists(
&mut self,
store: Resource<key_value::Store>,
key: String,
item: String,
) -> Result<bool, Error> {
let store_id = store.rep();
KeyValueStore::cf_exists(self, store_id, &key, &item).await
KeyValueStore::bf_exists(self, store_id, &key, &item).await
}

async fn drop(&mut self, store: Resource<key_value::Store>) -> Result<(), wasmtime::Error> {
Expand Down Expand Up @@ -171,11 +171,11 @@ impl KeyValueStore {

/// Get a value from a store by key.
#[instrument(skip(self), level = "trace", ret, err)]
pub async fn cf_exists(&self, store: u32, key: &str, item: &str) -> Result<bool, Error> {
pub async fn bf_exists(&self, store: u32, key: &str, item: &str) -> Result<bool, Error> {
let Some(store) = self.stores.get(store as usize) else {
return Err(Error::NoSuchStore);
};
store.cf_exists(key, item).await
store.bf_exists(key, item).await
}
}

Expand Down
6 changes: 3 additions & 3 deletions crates/key-value-store/src/redis_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ impl Store for RedisStore {
Ok(ret)
}

async fn cf_exists(&self, key: &str, item: &str) -> Result<bool, Error> {
redis::cmd("CF.EXISTS")
async fn bf_exists(&self, key: &str, item: &str) -> Result<bool, Error> {
redis::cmd("BF.EXISTS")
.arg(key)
.arg(item)
.query_async(&mut self.inner.clone())
.await
.map_err(|error| {
tracing::warn!(cause=?error, "redis cf_exists");
tracing::warn!(cause=?error, "redis bf_exists");
Error::InternalError
})
}
Expand Down