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

Document prepared statement compression properties. #11189

Merged
merged 1 commit into from
Feb 25, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public int getPreparedStatementCompressionThreshold()
}

@Config("protocol.v1.prepared-statement-compression.length-threshold")
@ConfigDescription("Prepared statements longer than the configured value will be compressed")
@ConfigDescription("Compression is applied to prepared statements longer than the configured value")
public ProtocolConfig setPreparedStatementCompressionThreshold(int preparedStatementCompressionThreshold)
{
this.preparedStatementCompressionThreshold = preparedStatementCompressionThreshold;
Expand All @@ -63,7 +63,7 @@ public int getPreparedStatementCompressionMinimalGain()
}

@Config("protocol.v1.prepared-statement-compression.min-gain")
@ConfigDescription("Prepared statement compression will not be applied if size gain is less than the configured value")
@ConfigDescription("Prepared statement compression is not applied if the size gain is less than the configured value")
public ProtocolConfig setPreparedStatementCompressionMinimalGain(int preparedStatementCompressionMinimalGain)
{
this.preparedStatementCompressionMinimalGain = preparedStatementCompressionMinimalGain;
Expand Down
22 changes: 21 additions & 1 deletion docs/src/main/sphinx/admin/properties-general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ on a per-query basis using the ``redistribute_writes`` session property.
**Type:** ``string``

The 351 release of Trino changes the HTTP client protocol headers to start with
``X-Trino-``. Clients for versions 350 and lower expect the HTTP headers to
``X-Trino-``. Clients for versions 350 and lower expect the HTTP headers to
start with ``X-Presto-``, while newer clients expect ``X-Trino-``. You can support these
older clients by setting this property to ``Presto``.

Expand All @@ -54,3 +54,23 @@ remove usage of this property.
Ensure to use this only as a temporary measure to assist in your migration
efforts.

``protocol.v1.prepared-statement-compression.length-threshold``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

* **Type:** :ref:`prop-type-integer`
* **Default value:** ``2048``

Prepared statements that are submitted to Trino for processing, and are longer
than the value of this property, are compressed for transport via the HTTP
header to improve handling, and to avoid failures due to hitting HTTP header
size limits.

``protocol.v1.prepared-statement-compression.min-gain``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

* **Type:** :ref:`prop-type-integer`
* **Default value:** ``512``

Prepared statement compression is not applied if the size gain is less than the
configured value. Smaller statements do not benefit from compression, and are
left uncompressed.