dynamodb-waiters-log-notification-enabled
--dynamodb-waiters-log-notification-enabled
is a global Boolean parameter for the Liquibase DynamoDB Pro extension. It specifies whether Liquibase sends you periodic status notifications while the DynamoDbWaiter
polls resources in your database. The default value is true
.
To see DynamoDB log notifications, you must also set --log-level
to INFO
(standard logs) or FINE
(more detailed logs). By default, log notifications go to STDOUT
.
Note: This parameter does not correspond to anything in the DynamoDB API. Instead, it informs you that Liquibase is waiting for DynamoDB to finish executing a create, delete, or update operation, which may take a long time.
Uses
When you ask Amazon DynamoDB to run an operation on a resource in your database, such as creating, updating, or deleting a table, DynamoDB calls a waiter class first. Waiters are AWS SDK objects that ensure consistency in distributed systems when DynamoDB doesn't perform operations instantly, but some code needs to wait until those operations are fully completed.
The waiter repeatedly checks whether the table is in the correct state (it "polls" the table). If the table is in the correct state (ACTIVE
or non-existent), the waiter approves the operation. Otherwise, if the table status is CREATING
, UPDATING
, or DELETING
, it tries polling again. The waiter repeats this indefinitely or until it times out. For more information, see Poll for resource states in the AWS SDK for Java 2.x: Waiters.
Note: Liquibase does not use Amazon DynamoDB waiters when you create, update, or delete indexes.
When you run Liquibase commands like update
and rollback
, Liquibase runs your changesets sequentially. For every change, it waits a default amount of time for DynamoDB to respond before moving onto the next changeset. The default waiter settings are appropriate for most situations. However, some operations may require custom waiter values to avoid errors or keep your CI/CD pipeline efficient.
You can customize the following behavior with Liquibase waiter parameters:
- Enabled: whether the waiter makes any polling attempts
- Interval: how long to wait between polling attempts
- Attempts: how many times to attempt to poll the resource
- Timeout: the total amount of time to spend polling
- Exit code: whether Liquibase fails after a waiter timeout
- Logs: whether Liquibase tells you about the status of the waiter, and how often to do so
The --dynamodb-waiters-log-notification-enabled
parameter controls whether to enable Liquibase log notifications about the status of the DynamoDB waiter while the waiter polls pending resources:
- If you want to receive log notifications, leave the parameter at its default value of
true
. This may be useful if you want to verify that Liquibase and DynamoDB are communicating, especially if you use additional tools that rely on Liquibase. If DynamoDB is simply taking a long time to finish an operation, this parameter informs you that neither Liquibase nor your other tools have stalled. - If you want to discard log notifications, set the parameter to
false
. This may be useful if you are running familiar workflows and want to keep your logs clean.
If you enable log notifications, Liquibase periodically generates messages of the following format:
INFO: [timestamp] Waiting on AWS Dynamo response... Creating table <name>
INFO: [timestamp] Waiting on AWS Dynamo response... Updating table <name>
INFO: [timestamp] Waiting on AWS Dynamo response... Deleting table <name>
To change the frequency of these notifications, see --dynamodb-waiters-log-notification-interval
.
Syntax
You can set this parameter in the following ways:
Option | Syntax |
---|---|
Liquibase properties file (defaults file) |
|
Global flow file argument (example) |
|
Global CLI parameter |
|
JVM system property (JAVA_OPTS Environment Variable) |
|
Liquibase Environment Variables |
|
For more information, see Working with Command Parameters.