Errata

Trino: The Definitive Guide

Errata for Trino: The Definitive Guide

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
PDF Page 55
1st Image

Figure 4-8. Transformation of the query plan to a distributed query plan might be slightly misleading as stage number should go from large to lower number, with stage 0 in coordinator.
- trinodb.slack.com/archives/C01TEP0HJTH/p1675640655419409

Jaeho Yoo  Feb 06, 2023 
PDF Page 271~272
6th paragraph

As mentioned in slack, Trino JAVA version has changed a lot since initial Trino Oreilly Guide 1st edition.
- trinodb.slack.com/archives/C01TEP0HJTH/p1670555267443549

As the book requires Java 17 LTS in page 27, JVM configs suggested in the book for debugging purpose also should be updated since those options has been removed before Java 17 due to bugs or etc.

I checked two sites below and run them in docker environment to see if they worked.
- docs.oracle.com/en/java/javase/17/docs/specs/man/java.html#convert-gc-logging-flags-to-xlog
- bugs.openjdk.org/browse/JDK-8145092?focusedCommentId=13877021&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-13877021

Here are changes suggested.

-XX:+PrintGCApplicationConcurrentTime
-XX:+PrintGCApplicationStoppedTime

> -Xlog:safepoint
> Note that PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime are logged on the same tag and aren't separated in the new logging.

-XX:+PrintGCCause

> GC cause is now always logged, so remove it.

-XX:+PrintGCDateStamps

> Date stamps are logged by the framework, so remove it

-XX:+PrintGCTimeStamps

> Time stamps are logged by the framework, so remove it

-XX:+PrintGCDetails

> -Xlog:gc*

-XX:+PrintReferenceGC

> -Xlog:gc+ref*=debug

-XX:+PrintClassHistogramAfterFullGC
-XX:+PrintClassHistogramBeforeFullGC

> -XX:+PrintClassHistogram
> Previous option has been removed, so suggest similar option; Enables printing of a class instance histogram after one of the following events.

-XX:PrintFLSStatistics=2

> Option has been removed.

-XX:+PrintAdaptiveSizePolicy

> -Xlog:gc+ergo\*=level
> Use a level of debug for most of the information, or a level of trace for all of what was logged for PrintAdaptiveSizePolicy.

-XX:+PrintSafepointStatistics
-XX:PrintSafepointStatisticsCount=1

> Option has been removed.

Jaeho Yoo  Dec 12, 2022 
PDF Page 271
1st paragraph

Trino server uses Java 17 LTS and for Trino server that uses a higher memory value and queries that consumes large memories, there could be issue with G1GC, especially with preventive GC.
- trinodb.slack.com/archives/CGB0QHWSW/p1670574061721919

Before calling full GC, G1GC tries young GC in separate thread to free up space. If all regions are used (old, humongous), JNI blocks GC. GC retries max twice, and throws OOM afterward, and does not call full GC.

This feature of preventive GC was added in Java 17 and turned on as default value. However, default value for the option is turned off in Java 20 and is now debating whether to remove it completely.

Therefore, I suggest guide should include on how to handle if such issue happens, by disabling preventive GC; add JVM option below:
-XX:+UnlockDiagnosticVMOptions
-XX:-G1UsePreventiveGC

Jaeho Yoo  Dec 12, 2022 
Mobi Page 389
Sentence „No use of other data sources within AWS or outside possible

A comment about the features of AWS Athena : There is now a Service „Athena Federated Query“ that allows to connect to other datasources than S3

Gerhard Zorn  Jul 23, 2023