forked from delphix/virtualization-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for gRPC message and memory limits delphix#390
- Loading branch information
Showing
6 changed files
with
38 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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 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,27 @@ | ||
# 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 plugin to engine, 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 plugin to 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 plugin to the engine, 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). | ||
|
||
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 or stdout. | ||
2. Using a single `logger` command with many pages of output. | ||
3. Throwing an exception with a large message or stack trace. | ||
|
||
## How to tell if the message size was exceeded | ||
When a plugin operation or platform library callback fails with a `RpcError`. | ||
|
||
## What to do if the maximum metadata or message size is exceeded | ||
Please reach out to us via the [Virtualization SDK GitHub repository](https://github.com/delphix/virtualization-sdk/) for guidance. |
This file contains 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 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 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 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