-
Notifications
You must be signed in to change notification settings - Fork 27
Add documentation for gRPC message and memory limits #390 #391
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,3 +7,4 @@ arrange: | |
| - Unicode_Data.md | ||
| - Working_with_Powershell.md | ||
| - Scratch_Paths.md | ||
| - Message_Limits.md | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Message Limits | ||
|
|
||
| There are limits on how much data can be sent back and forth between the plugin and engine at a time. There are five scenarios where this comes into play: | ||
| 1. Inputs sent from the engine to the plugin, as arguments to a [Plugin Operation](/References/Plugin_Operations.md). For example, the schema-defined `Repository` object that is provided as input to plugin operations. | ||
| 2. Outputs sent back from the plugin to the engine, as the return values from plugin operations. | ||
| 3. Exception messages and call stacks thrown by plugin code. For example, the `message` field within [User Visible Errors](/Best_Practices/User_Visible_Errors.md). | ||
| 4. Inputs sent from the plugin to the engine, as arguments to a [Platform library](/References/Platform_Libraries.md) function. For example, the `message` field that is passed to `logger.debug`. | ||
| 5. Outputs sent back from the engine to the plugin, as the return values from Platform Library functions. For example, the `stdout` resulting from a call to `libs.run_bash`. | ||
|
|
||
| For case 1 and 2, the total size of data must be less than 4 mebibytes (4 MiB). | ||
|
|
||
| For case 3, the total size of data must be less than 128 kibibytes (128 KiB). | ||
|
|
||
| For case 4 and 5, the total size of data must be less than 32 mebibytes (32 MiB). | ||
jeffngo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| The actual size of this information at runtime is dependent on how the Python interpreter chooses to represent the information, so it's not always possible to know ahead of time what the exact size will be. | ||
|
|
||
| Here are some examples of where problems may occur: | ||
| 1. Using `libs.run_bash` to print the entire contents of a large file to stdout. | ||
| 2. Using a single `logger` command with many pages of output. | ||
| 3. Throwing an exception with a large message or stack trace. | ||
jeffngo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 4. Large amount of metadata in a plugin defined schema like `Repository` or `Virtual Source`. | ||
|
|
||
| ## How to tell if the message size was exceeded | ||
| The plugin operation or platform library callback will fail with a RPC error. The exception will look like: | ||
| ``` | ||
| Error | ||
| Discovery of "my_plugin" failed: Plugin operation "Repository Discovery" got a RPC error for plugin "my_plugin". UNAVAILABLE: Network closed for unknown reason | ||
| ``` | ||
|
|
||
| ## What to do if the maximum metadata or message size is exceeded | ||
| Reach out to us via the [Virtualization SDK GitHub repository](https://github.com/delphix/virtualization-sdk/) for guidance. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.