diff --git a/core/trino-main/src/main/java/io/trino/server/ProtocolConfig.java b/core/trino-main/src/main/java/io/trino/server/ProtocolConfig.java index 30225ba9d6d6..ff0ba8f72be3 100644 --- a/core/trino-main/src/main/java/io/trino/server/ProtocolConfig.java +++ b/core/trino-main/src/main/java/io/trino/server/ProtocolConfig.java @@ -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; @@ -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; diff --git a/docs/src/main/sphinx/admin/properties-general.rst b/docs/src/main/sphinx/admin/properties-general.rst index 93709202cb99..0b9ed0bb4807 100644 --- a/docs/src/main/sphinx/admin/properties-general.rst +++ b/docs/src/main/sphinx/admin/properties-general.rst @@ -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``. @@ -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.