Skip to content

Commit 223d780

Browse files
authored
Spelling (#68)
* link: instructions to build the valkey-bloom module from source Signed-off-by: Josh Soref <[email protected]> * link: instructions to build Valkey from source Signed-off-by: Josh Soref <[email protected]> * spelling: calculates Signed-off-by: Josh Soref <[email protected]> * spelling: capacity Signed-off-by: Josh Soref <[email protected]> * spelling: default Signed-off-by: Josh Soref <[email protected]> * spelling: defragmentation Signed-off-by: Josh Soref <[email protected]> * spelling: different Signed-off-by: Josh Soref <[email protected]> * spelling: during Signed-off-by: Josh Soref <[email protected]> * spelling: expansion Signed-off-by: Josh Soref <[email protected]> * spelling: fall back Signed-off-by: Josh Soref <[email protected]> * spelling: filterdecoded Signed-off-by: Josh Soref <[email protected]> * spelling: greater Signed-off-by: Josh Soref <[email protected]> * spelling: integration Signed-off-by: Josh Soref <[email protected]> * spelling: number Signed-off-by: Josh Soref <[email protected]> * spelling: positive Signed-off-by: Josh Soref <[email protected]> * spelling: specifying Signed-off-by: Josh Soref <[email protected]> * spelling: to return Signed-off-by: Josh Soref <[email protected]> * spelling: version Signed-off-by: Josh Soref <[email protected]> * spelling: versions Signed-off-by: Josh Soref <[email protected]> --------- Signed-off-by: Josh Soref <[email protected]>
1 parent bf60c40 commit 223d780

File tree

13 files changed

+24
-24
lines changed

13 files changed

+24
-24
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
server_version: ['unstable', '8.0', '8.1']
2020
steps:
2121
- uses: actions/checkout@v4
22-
- name: Set the server verison for python integeration tests
22+
- name: Set the server version for python integration tests
2323
run: echo "SERVER_VERSION=${{ matrix.server_version }}" >> $GITHUB_ENV
2424
- name: Run cargo and clippy format check
2525
run: |
@@ -84,7 +84,7 @@ jobs:
8484
server_version: ['unstable', '8.0', '8.1']
8585
steps:
8686
- uses: actions/checkout@v4
87-
- name: Set the server verison for python integeration tests
87+
- name: Set the server version for python integration tests
8888
run: echo "SERVER_VERSION=${{ matrix.server_version }}" >> $GITHUB_ENV
8989
- name: Run cargo and clippy format check
9090
run: |

QUICK_START.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Follow these steps to set up, build, and run the Valkey server with the valkey-b
44

55
## Step 1: Install Valkey and valkey-bloom
66

7-
1. Build Valkey from source by following the instructions [here](https://github.com/valkey-io/valkey?tab=readme-ov-file#building-valkey-using-makefile). Make sure to use Valkey version 8.0 or above.
7+
1. Follow the [instructions to build Valkey from source](https://github.com/valkey-io/valkey?tab=readme-ov-file#building-valkey-using-makefile). Make sure to use Valkey version 8.0 or above.
88

9-
2. Build the valkey-bloom module from source by following the instructions [here](https://github.com/valkey-io/valkey-bloom/blob/unstable/README.md#build-instructions).
9+
2. Follow the [instructions to build the valkey-bloom module from source](https://github.com/valkey-io/valkey-bloom/blob/unstable/README.md#build-instructions).
1010

1111
## Step 2: Run the Valkey Server with valkey-bloom
1212

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# valkey-bloom
22

3-
Valkey-Bloom (BSD-3-Clause) is a Rust based Valkey-Module which brings a Bloom Filter (Module) data type into Valkey and supports verions >= 8.0. With this, users can create bloom filters (space efficient probabilistic data structures) to add elements, check whether elements exists, auto scale their filters, customize bloom filter properties, perform RDB Save and load operations, etc.
3+
Valkey-Bloom (BSD-3-Clause) is a Rust based Valkey-Module which brings a Bloom Filter (Module) data type into Valkey and supports versions >= 8.0. With this, users can create bloom filters (space efficient probabilistic data structures) to add elements, check whether elements exists, auto scale their filters, customize bloom filter properties, perform RDB Save and load operations, etc.
44

55
Valkey-Bloom is built using `bloomfilter::Bloom` (https://crates.io/crates/bloomfilter which has a BSD-2-Clause license).
66

@@ -76,4 +76,4 @@ valkey-server --loadmodule /path/to/libvalkey_bloom.so
7676
cargo build --release --features valkey_8_0
7777
```
7878

79-
This can also be done by specifiyng SERVER_VERSION=8.0.0 and then running `./build.sh`
79+
This can also be done by specifying SERVER_VERSION=8.0.0 and then running `./build.sh`

src/bloom/data_type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ impl ValkeyDataType for BloomObject {
5757
/// Callback to load and parse RDB data of a bloom item and create it.
5858
fn load_from_rdb(rdb: *mut raw::RedisModuleIO, encver: i32) -> Option<BloomObject> {
5959
if encver > BLOOM_TYPE_ENCODING_VERSION {
60-
logging::log_warning(format!("{}: Cannot load bloomfltr data type of version {} because it is higher than the loaded module's bloomfltr supported version {}", MODULE_NAME, encver, BLOOM_TYPE_ENCODING_VERSION).as_str());
60+
logging::log_warning(format!("{}: Cannot load bloomfltr data type of version {} because it is greater than the loaded module's bloomfltr supported version {}", MODULE_NAME, encver, BLOOM_TYPE_ENCODING_VERSION).as_str());
6161
return None;
6262
}
6363
let Ok(num_filters) = raw::load_unsigned(rdb) else {

src/bloom/utils.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ impl BloomObject {
193193
+ (filters_vec_capacity * std::mem::size_of::<Box<BloomFilter>>())
194194
}
195195

196-
/// Caculates the number of bytes that the bloom object will require to be allocated.
196+
/// Calculates the number of bytes that the bloom object will require to be allocated.
197197
/// This is used when scaling out a bloom object to check if the new
198198
/// size will be within the allowed size limit.
199199
/// Returns whether the bloom object is of a valid size or not.
@@ -202,7 +202,7 @@ impl BloomObject {
202202
BloomObject::validate_size(bytes)
203203
}
204204

205-
/// Caculates the number of bytes that the bloom object will require to be allocated.
205+
/// Calculates the number of bytes that the bloom object will require to be allocated.
206206
/// This is used when creating a new bloom object to check if the size is within the allowed size limit.
207207
/// Returns whether the bloom object is of a valid size or not.
208208
fn validate_size_before_create(capacity: i64, fp_rate: f64) -> bool {
@@ -273,7 +273,7 @@ impl BloomObject {
273273
self.expansion
274274
}
275275

276-
/// Return the false postive rate of the bloom object.
276+
/// Return the false positive rate of the bloom object.
277277
pub fn fp_rate(&self) -> f64 {
278278
self.fp_rate
279279
}
@@ -490,7 +490,7 @@ impl BloomObject {
490490
/// * `validate_scale_to` - the capacity we check to see if it can scale to. If this method is called from BF.INFO this is set as -1 as we
491491
/// want to check the maximum size we could scale up till
492492
/// * `tightening_ratio` - The tightening ratio of the object
493-
/// * `expansion` - The expanison rate of the object
493+
/// * `expansion` - The expansion rate of the object
494494
///
495495
/// # Returns
496496
/// * i64 - The maximum capacity that can be reached if called from BF.INFO. If called from BF.INSERT the size it reached when it became greater than `validate_scale_to`
@@ -645,12 +645,12 @@ impl BloomFilter {
645645
self.bloom.seed()
646646
}
647647

648-
/// Return the numer of items in the BloomFilter.
648+
/// Return the number of items in the BloomFilter.
649649
pub fn num_items(&self) -> i64 {
650650
self.num_items
651651
}
652652

653-
/// Return the capcity of the BloomFilter - number of items that can be added to it.
653+
/// Return the capacity of the BloomFilter - number of items that can be added to it.
654654
pub fn capacity(&self) -> i64 {
655655
self.capacity
656656
}
@@ -761,7 +761,7 @@ mod tests {
761761
Ok(1) => {
762762
if let Some(err) = expected_error {
763763
panic!(
764-
"Expected error on the bloom object during during item add: {:?}",
764+
"Expected error on the bloom object during item add: {:?}",
765765
err
766766
);
767767
}
@@ -1253,7 +1253,7 @@ mod tests {
12531253

12541254
#[test]
12551255
fn test_vec_capacity_matches_size_calculations() {
1256-
// This unit test is designed to make sure out calculations with capcity will always match the correct vec capacity
1256+
// This unit test is designed to make sure out calculations with capacity will always match the correct vec capacity
12571257
let mut test_v = vec![0];
12581258
for i in 0..5000 {
12591259
let x = if i == 0 {

src/configs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub const BLOOM_TIGHTENING_RATIO_MAX: f64 = 1.0;
2828

2929
pub const BLOOM_USE_RANDOM_SEED_DEFAULT: bool = true;
3030

31-
pub const BLOOM_DEFRAG_DEAFULT: bool = true;
31+
pub const BLOOM_DEFRAG_DEFAULT: bool = true;
3232

3333
// Max Memory usage allowed overall within a bloom object (128MB).
3434
// Beyond this threshold, a bloom object is classified as large.
@@ -43,7 +43,7 @@ lazy_static! {
4343
pub static ref BLOOM_MEMORY_LIMIT_PER_OBJECT: AtomicI64 =
4444
AtomicI64::new(BLOOM_MEMORY_LIMIT_PER_OBJECT_DEFAULT);
4545
pub static ref BLOOM_USE_RANDOM_SEED: AtomicBool = AtomicBool::default();
46-
pub static ref BLOOM_DEFRAG: AtomicBool = AtomicBool::new(BLOOM_DEFRAG_DEAFULT);
46+
pub static ref BLOOM_DEFRAG: AtomicBool = AtomicBool::new(BLOOM_DEFRAG_DEFAULT);
4747
pub static ref BLOOM_FP_RATE_F64: Mutex<f64> = Mutex::new(
4848
BLOOM_FP_RATE_DEFAULT
4949
.parse::<f64>()

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ valkey_module! {
134134
],
135135
bool: [
136136
["bloom-use-random-seed", &*configs::BLOOM_USE_RANDOM_SEED, configs::BLOOM_USE_RANDOM_SEED_DEFAULT, ConfigurationFlags::DEFAULT, None],
137-
["bloom-defrag-enabled", &*configs::BLOOM_DEFRAG, configs::BLOOM_DEFRAG_DEAFULT, ConfigurationFlags::DEFAULT, None],
137+
["bloom-defrag-enabled", &*configs::BLOOM_DEFRAG, configs::BLOOM_DEFRAG_DEFAULT, ConfigurationFlags::DEFAULT, None],
138138
],
139139
enum: [
140140
],

src/wrapper/bloom_callback.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ fn external_vec_defrag(vec: Vec<u8>) -> Vec<u8> {
187187
/// contains a vec of BloomFilter structs. Each BloomFilter contains a Bloom structure implemented in an external Rust crate.
188188
/// Finally, each of these external Bloom structures contains a Vec (bit vector).
189189
///
190-
/// The order of defragmention is as follows (1 to 3 is in a loop for the number of filters):
190+
/// The order of defragmentation is as follows (1 to 3 is in a loop for the number of filters):
191191
/// 1. BloomFilter structures within the top level BloomObject structure
192192
/// 2. External Bloom structures within each BloomFilter
193193
/// 3. Vec (Bit vector) within each external Bloom structure

src/wrapper/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub fn must_obey_client(ctx: &Context) -> bool {
2222

2323
#[cfg(feature = "valkey_8_0")]
2424
{
25-
// On Valkey 8.0, fallback to checking for replicated flag in the GetContextFlags API as a best effort.
25+
// On Valkey 8.0, fall back to checking for replicated flag in the GetContextFlags API as a best effort.
2626
ctx.get_flags()
2727
.contains(valkey_module::ContextFlags::REPLICATED)
2828
}

tests/test_bloom_acl_category.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def test_bloom_acl_category_permissions(self):
1919
client = self.server.get_new_client()
2020
# Get a list of all commands with the acl category bloom
2121
list_of_bloom_commands = client.execute_command("COMMAND LIST FILTERBY ACLCAT bloom")
22-
# Create users with differnt acl permissions
22+
# Create users with different acl permissions
2323
client.execute_command("ACL SETUSER nonbloomuser1 on >bloom_pass -@bloom")
2424
client.execute_command("ACL SETUSER nonbloomuser2 on >bloom_pass -@all")
2525
client.execute_command("ACL SETUSER bloomuser1 on >bloom_pass ~* &* +@all ")

0 commit comments

Comments
 (0)