Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Documentation in OpLifecycle #23636

Merged
merged 3 commits into from
Jan 29, 2025

Conversation

MarioJGMsoft
Copy link
Contributor

@MarioJGMsoft MarioJGMsoft commented Jan 22, 2025

Description

When the changes in the feature are merged, the current README.md of OpLifecycle will be outdated, therefore we need to update it to match the current flow of ops.

Execution Plan

Update the README.md of the OpLifecycle folder.

Acceptance Criteria

The new README.md reflects the new flow of OpLifecycle.

Reviewer Guidance

Let me know if there's a better way to write the changes in the docs

Fixes: AB#28650

@MarioJGMsoft MarioJGMsoft requested a review from a team January 22, 2025 23:52
@github-actions github-actions bot added the area: runtime Runtime related issues label Jan 22, 2025
@github-actions github-actions bot added the base: main PRs targeted against main branch label Jan 22, 2025
@MarioJGMsoft MarioJGMsoft changed the title docs: updated opLifecycle docs Update Documentation in OpLifecycle Jan 22, 2025
@markfields
Copy link
Member

Thanks for doing this! Overall suggestion - Can you move the "Grouped batching" section above the "Compression" section? Then your new part about grouping being required will have enough context to make more sense.

Comment on lines 72 to 75
Compressing a batch yields a batch with the same number of messages. It compresses all the content, shifting the compressed payload into the first op,
leaving the rest of the batch's messages as empty placeholders to reserve sequence numbers for the compressed messages.

### Single message batch update
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd update this to emphasize the current reality more. So before this paragraph, start ### Only single-message batches are compressed. Then under that heading you can explain how compression can only be enabled if Grouped Batching is enabled, and that it wasn't always this way, and explain about how compressing a multi-message batch would yield empty placeholder ops (btw we don't say "operations"), but we don't do that anymore (but we do support reading those ops still)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied changes

Comment on lines 209 to 211
## How it works (Grouped Batching disabled) -Outdated-

### Outdated - Main code no longer creates empty ops
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## How it works (Grouped Batching disabled) -Outdated-
### Outdated - Main code no longer creates empty ops
## Legacy behavior - Compression without Grouped Batching
### IMPORTANT - As of 2.20.0, we no longer compress ungrouped batches, but we do need to read such ops - read on to learn what these legacy ops look like

Or something like that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied changes

@@ -200,7 +209,9 @@ Ungrouped batch:
+-----------------+-----------------+-----------------+-----------------+-----------------+
```

## How it works (Grouped Batching disabled)
## Legacy begavior - How it works (Grouped Batching disabled)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Legacy begavior - How it works (Grouped Batching disabled)
## Legacy behavior - How it used to work (Compression+Chunking without Grouped Batching)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied changes

@@ -80,7 +68,7 @@ Grouped batching is only relevant for `FlushMode.TurnBased`, since `OpGroupingMa

Grouped Batching can be disabled by setting `IContainerRuntimeOptions.enableGroupedBatching` to `false`.

See [below](#how-grouped-batching-works) for an example.
See [below](#how-it-works) for an example.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this link work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It didn't before so I fixed it.

@@ -80,7 +68,7 @@ Grouped batching is only relevant for `FlushMode.TurnBased`, since `OpGroupingMa

Grouped Batching can be disabled by setting `IContainerRuntimeOptions.enableGroupedBatching` to `false`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this line too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied changes


### Only single-message batches are compressed

The batch to compress has to have only one message and it yields a batch with a single message. It compresses all the content, storing the compressed payload into the first op.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The batch to compress has to have only one message and it yields a batch with a single message. It compresses all the content, storing the compressed payload into the first op.
The batch to compress has to have only one message and it yields a batch with a single message. It compresses all the content, replacing the op's original contents with the compressed payload and the appropriate metadata to indicate it's compressed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied changes

Copy link
Member

@markfields markfields left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few final suggested edits

@MarioJGMsoft MarioJGMsoft marked this pull request as ready for review January 23, 2025 18:58
Copy link
Contributor

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> [email protected] ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> [email protected] serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> [email protected] check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  170508 links
    1603 destination URLs
    1842 URLs ignored
       0 warnings
       0 errors


@MarioJGMsoft MarioJGMsoft merged commit 71e5977 into microsoft:main Jan 29, 2025
37 checks passed
@MarioJGMsoft MarioJGMsoft deleted the updateOpLifecycleDocs branch January 29, 2025 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: runtime Runtime related issues base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants