Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion docs/docs/Best_Practices/Message_Limits.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,44 @@
# 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).
For case 4 and 5, the total size of data must be less than 192 mebibytes (192 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 to stdout.

2. Using a single `logger` command with many pages of output.

3. Throwing an exception with a large message or stack trace.

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.
10 changes: 5 additions & 5 deletions docs/docs/References/html/VirtualSourceDelete.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<title>Draw.io Diagram</title>
<meta http-equiv="refresh" content="0;URL='https://www.draw.io/?state=%7B%22ids%22:%5B%221HFcufpN6oaA0JSLXy53Q9dzmEO26Iqng%22%5D,%22action%22:%22open%22,%22userId%22:%22110114316315334056404%22%7D#G1KOVsgiO2zG2tVp2PI8Zt8-P3Im-58zAv'"/>
<title>VirtualSourceDelete.html</title>
<meta charset="utf-8"/>
</head>
<body>
<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="{&quot;highlight&quot;:&quot;#0000ff&quot;,&quot;nav&quot;:true,&quot;resize&quot;:true,&quot;xml&quot;:&quot;&lt;mxfile modified=\&quot;2019-03-18T01:03:04.218Z\&quot; host=\&quot;www.draw.io\&quot; agent=\&quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36\&quot; etag=\&quot;jmkhScjXoxOtkP5F7VnJ\&quot; version=\&quot;10.4.9\&quot; type=\&quot;google\&quot;&gt;&lt;diagram id=\&quot;-ZfKtbs5jN34PJB2tePp\&quot; name=\&quot;Page-1\&quot;&gt;7Vhdb9owFP01SNtDUb5IwmNbulaaKlViG+ve3OQmsebEmWMK7NfPJnZwPsYoLV2lDSTke3xtx/cc+14yci/z9TVDZXZLYyAjx4rXI3c2cpypHYpfCWxqwAu9GkgZjmvI3gFz/BMUaCl0iWOoWo6cUsJx2QYjWhQQ8RaGGKOrtltCSXvVEqXQA+YRIn10gWOe1Wg4sXb4DeA00yvblurJkXZWQJWhmK4MyL0auZeMUl638vUlEBk7HZd63Iff9DYPxqDghwzIF/ks/BwtPsOnj9FF+ONusWBnapZHRJZqwyPHJ2K+i6pEhWinsv0FM75EcrI5XbIIRGMGBDho5wemXeccMQ5xv0Mj4gHNqVVs+EYHvOKMfm9iLaJ0kfGciKYtHypDpfTL16lU2zghdBVlYsUxB5bjAnHKhNsqwxzmJYqk70p4CizBhFxSIvvFMm6MIEwiOeV2PaPHj0J4SJpHMwOsowVii2sDUgG/BpoDZxvhono926mHKPVPHHUcVjst2VpLmaEjX2FIyTdtpt4xLBqK5CcQ7vQIfwK5Q9qY0WKP5xthO0nAjwbZjoPpgziyJ2E79IK/zLbbY/uxZnu8LMSNmeB0yeDd+x4tjC6LGGLFw1CADZrQQ0XJksM5i9T9vUV3ltcE3iS6S9FEfgcP5PYjR9CCG3j9eSHq9MFU1AWW06dO5zKTOtc5EXX+wM3cYQmK+FymOGFFBFUVjtrEwBrzr6JtjSfKujd6ZnLrljY22ijEwxuDpHlv9u2GbS097rccVPWl8keNiryRghp6S29ImJzxODtzNz/KW/9D9U3fXBC3EnafUYOxobOmMQYEcfzYTvNDLKoV7igWO2sE40ytlmCmXucM1/tWo8y03JnIC4O28qZBe6I6ML2JtqJqtn28zoIX0NmRmjlKn8K4A4bFtoE9W3u6ovyT9ux/Q3u+O31V7TlD5ecbFt9BQtsnIFNo+y7DNyK0nj6CzhSHCs3x2or1w/BUQtsXfkNndwzO5pyWPb3JmgGL/3/nBKeFFJ3gWt40rcK0V8zoUlVoAxEChIqKNRd4aVxVrT7jDhusr9oVmFFMbVer29bYkeVPRHN5KLYK7RRVYMcTCIaKqqkfuMhvNN2rlAZkvqfu7cjEcfvFkzcgU/cF6t59tYLJN634f8JPRHgQDlTLr0p4/4/O0xPJK1bLW2u4jOlc/celG+fAdOP81ewy7ajI847MLnY7uzRv556dXYS5e0FXu+/ecrpXvwA=&lt;/diagram&gt;&lt;/mxfile&gt;&quot;,&quot;toolbar&quot;:&quot;pages zoom layers lightbox&quot;,&quot;page&quot;:0}"></div>
<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="https://www.draw.io/?state=%7B%22ids%22:%5B%221HFcufpN6oaA0JSLXy53Q9dzmEO26Iqng%22%5D,%22action%22:%22open%22,%22userId%22:%22110114316315334056404%22%7D#G1KOVsgiO2zG2tVp2PI8Zt8-P3Im-58zAv" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>
<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="{&quot;highlight&quot;:&quot;#0000ff&quot;,&quot;nav&quot;:true,&quot;resize&quot;:true,&quot;xml&quot;:&quot;&lt;mxfile modified=\&quot;2021-12-17T16:10:41.841Z\&quot; host=\&quot;app.diagrams.net\&quot; agent=\&quot;5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36\&quot; etag=\&quot;e6FnAnGHRtOD4VvPbmsw\&quot; version=\&quot;16.0.0\&quot; type=\&quot;device\&quot;&gt;&lt;diagram id=\&quot;-ZfKtbs5jN34PJB2tePp\&quot; name=\&quot;Page-1\&quot;&gt;7Vnbbts4EP0aA7sPMXSxJfkxjpsGKAJk4W3d9I2WRhcsJSoUFdv9+iUl0qIutRPDTo3FJkBAHg5vcw45I2Zk36XbzxTl8SMJAI8sI9iO7MXIsjzL438FsKuBqWXXQESToIbMBlgmP0GChkTLJICiZcgIwSzJ26BPsgx81sIQpWTTNgsJbs+aowh6wNJHuI+ukoDFcltTo8EfIIliNbNpyJYUKWMJFDEKyEaD7E8j+44SwupSur0DLHyn/FL3u/9F635hFDL2lg7pKl14X/3VV/j7iz/3Xp5WK3ojR3lFuJQbHlkO5uPNixxlvByJ8reEshKJwZakpD7wwgIwMFDGa6pMlwxRBkG/QSF8gfrQ0jdspxxeMEr+2fuae2kesxTzoikWFaNc2KXbSKhtHGKy8WM+45gBTZMMMUK52SZOGCxz5AvbDbfkWJhgfEewaOfT2AECL/TFkNV8Wovje7AO90vTHay8BXyLWw2SDv8MJAVGd9xEtk5Mq+6yV788DptGS6bSUqzpyJEYkvKN9kM3DPOCJPkdhFs9wt9B7pA2FiQ7YHklbIchOP4g24E7W/MjexG2Z+b0N7Nt99h+rdkelxm/McMkKin88WePFkrKLIBA8jDkYI0mtC4ILhncUl/e3xXa1CZ7x+tEdymait/BA1n9iB4kYxpe/5yJOnUwJXWuYfWpM70+dbZ1IeqcgZu5wxJkwa0IcbzmY1QUid8mBrYJ+87Lxngqa89ay0Js3VCVnapkfPFaJ1F91tuablVN9fslBzweRCChR/KAvfCGBfGNvXvJH5374oe6kSBoBeI+UxoTQ2dIYRQwYslrO3wPsSNneCIJX3EjBM9tCcEzOgQX1SUpe+nh9thAzrQ9UO2Y3kCVWPbbPl0/7hn0c6IWTtIdrzwBTfi2gR7TVM3B8bTmqPbMq9KeNTPa8WPSiQunas+xZx+qPWsorbxi8b1JaIcEpAvtUCC+EqH19OF2hnir0KxJW7GO511KaIfcr+nsicLNkpG8pzeRCyT8u+4WJ1EmRMe5FjdNK+HsJSkqBeXaQBgDJjwTTTmea1dVq027wwbzpnZmpSVJ1Wx12RhbIq3xSSoORaXQTrIEZjAFdyhZmjmujZxz5bMdmahvdz0pmgzI1D5DPnsoV9D5JgX7n/ALEb5/5vhthPc/YN4fSD4wC65qJ6Uxh+R+NLpcWQo966hIfRa/O7qYnXzIvFh02Tz/mP788tfD/bf5nK4f71+I7Q8+jn2A+AbJPC0Ptq9KB+dKZ13X+FAd9KOOekXxMaCszP8jLyi9QDEgure/oLgDseNMLyi82ryb1yw3/3ywP/0L&lt;/diagram&gt;&lt;/mxfile&gt;&quot;,&quot;toolbar&quot;:&quot;pages zoom layers lightbox&quot;,&quot;page&quot;:0}"></div>
<script type="text/javascript" src="https://app.diagrams.net/js/viewer-static.min.js"></script>
</body>
</html>
Binary file modified docs/docs/References/images/VirtualSourceDelete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.