Skip to content

Commit 5cc7c37

Browse files
authored
fix(docs): fix grammar errors in README, examples, and test comments (#3011)
Closes #3009
1 parent d4a5287 commit 5cc7c37

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ Run the tests:
233233

234234
Set root user credentials (OPTIONAL):
235235

236-
Iggy requires credentials to authenticate request to the server.
236+
Iggy requires credentials to authenticate requests to the server.
237237
You can set the root user **before** starting the server.
238238

239239
(macOS/Linux)

core/integration/tests/server/scenarios/log_rotation_scenario.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ async fn validate_log_rotation_rules(
256256
// The delay in log writing in Iggy mainly depends on the processing speed
257257
// of background threads and the operating system's I/O scheduling, which
258258
// means that the actual size of written logs may be slightly larger than
259-
// expected. So there ignores tiny minor overflow by comparing integer KB
259+
// expected. So this ignores tiny minor overflow by comparing integer KB
260260
// values instead of exact bytes.
261261

262262
let mut total_log_size = IggyByteSize::new(0);

core/integration/tests/server/scenarios/stream_size_validation_scenario.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ pub async fn run(harness: &TestHarness) {
104104
// 14. Delete first topic on the first stream
105105
delete_topic(&client, S1_NAME, T1_NAME).await;
106106

107-
// 15. Validate both streams, first should have it's message count and size should be reduced by 50%, second stream should be unchanged
107+
// 15. Validate both streams, first should have its message count and size should be reduced by 50%, second stream should be unchanged
108108
validate_stream(&client, S1_NAME, MSGS_SIZE * 2, MSGS_COUNT * 2).await;
109109
validate_stream(&client, S2_NAME, MSGS_SIZE * 4, MSGS_COUNT * 4).await;
110110

@@ -124,7 +124,7 @@ pub async fn run(harness: &TestHarness) {
124124
// 20. Purge second stream
125125
purge_stream(&client, S2_NAME).await;
126126

127-
// 21. Validate second stream and it's topics, should be empty
127+
// 21. Validate second stream and its topics, should be empty
128128
validate_stream(&client, S2_NAME, 0, 0).await;
129129
validate_topic(&client, S2_NAME, T1_NAME, 0, 0).await;
130130
validate_topic(&client, S2_NAME, T2_NAME, 0, 0).await;

examples/rust/src/message-headers/message-compression/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub const STREAM_NAME: &str = "compression-stream";
4141
pub const TOPIC_NAME: &str = "compression-topic";
4242
```
4343

44-
Additionally, set a constant that defines the number of messages to be send to the server via the producer.
44+
Additionally, set a constant that defines the number of messages to be sent to the server via the producer.
4545

4646
```rust
4747
pub const NUM_MESSAGES: u32 = 1000;
@@ -50,12 +50,12 @@ pub const NUM_MESSAGES: u32 = 1000;
5050
### Spotlight: IggyMessage's
5151
5252
In order to add functionality to compress and decompress messages during transit, we need to know what a message actually is and how it is implemented.
53-
Iggy implements two important types, that we need to know.
53+
Iggy implements two important types that we need to know.
5454
5555
* [IggyMessage](https://github.com/apache/iggy/blob/e46f294b7af4f86b0d7e26d984205a019a8885f8/core/common/src/types/message/iggy_message.rs#L108)
5656
* [ReceivedMessage](https://github.com/apache/iggy/blob/b26246252502ba6f5d6cad2895e7c468d9f959e4/core/sdk/src/clients/consumer.rs#L905)
5757
58-
A message send to the server needs to be of type `IggyMessage`.
58+
A message sent to the server needs to be of type `IggyMessage`.
5959
6060
```Rust
6161
pub struct IggyMessage {
@@ -71,17 +71,17 @@ pub struct IggyMessage {
7171
The important bits in context of this example are the *payload* and the *user_headers*.
7272
Payload is of type Bytes and corresponds to the actual message that we want to send to the server.
7373
74-
Let's suppose our example is an abstraction over a real world scenario, where some application sends it's application logs to the iggy-server. This application is therefore the producer.
74+
Let's suppose our example is an abstraction over a real world scenario, where some application sends its application logs to the iggy-server. This application is therefore the producer.
7575
We also have a monitoring service, that inspects the logs of our application to check for any service disruptions. So this monitoring service needs to read the logs from the iggy-server and is therefore the consumer.
7676

7777
Further suppose, the application logs are quite large and repetitive, since they follow a structured pattern (as logs usually do).
78-
It may be a good idea to reduce bandwidth by trading of some idle CPU time to compress the logs before sending them to the server.
78+
It may be a good idea to reduce bandwidth by trading off some idle CPU time to compress the logs before sending them to the server.
7979
We go straight ahead, implement some compression functionalities and send the compressed messages to the server.
8080
If the monitoring service now consumes these messages we have a problem. The logs are still compressed.
8181
Even if we know that the messages are compressed we do not know how to decompress them because the algorithm that was used for compression is unknown.
8282

8383
This is where `user_headers` become handy.
84-
The definition above tells us, that user_headers are (optional) Bytes. But thats because finally everything is serialized before sending to the server.
84+
The definition above tells us that user_headers are (optional) Bytes. But that's because finally everything is serialized before sending to the server.
8585
Looking at the implementation of `IggyMessage` we see that user_headers are a serialized `HashMap` with Iggy specific types `HeaderKey` and `HeaderValue`.
8686
So the user_headers are basically a set of metadata defined by us, the user, using a key and a value.
8787

0 commit comments

Comments
 (0)