Table of Contents

Class TableNotActiveException

Namespace
DynaSharp
Assembly
DynaSharp.dll

A wait for a table and its global secondary indexes to turn ACTIVE ran out of time: LastStatus and PendingIndex say what held it up, and a longer wait is usually the answer.

public sealed class TableNotActiveException : TimeoutException, ISerializable
Inheritance
TableNotActiveException
Implements
Inherited Members

Remarks

Where it comes from. WaitUntilActiveAsync(TimeSpan, CancellationToken), or WaitUntilActive(TimeSpan), which also ends early on a table that lacks an index the command declares. It is a TimeoutException, so a catch (TimeoutException) around a wait keeps working.

Wait again or not. A wait that ran out says nothing about whether the table will turn active: restoring a table, or an index that UpdateTable added, which takes minutes even on an empty table, can take longer than a wait, and DynamoDB goes on by itself, so wait again with a longer timeout. A status such as Deleting says otherwise, and so does the wait of CreateTableCommand that ends before its timeout because the table did not list an index the command declares, at five looks in a row: no wait adds that index, only an UpdateTable. LastStatus tells these apart, and a null there means that the last look did not find the table, which can be a wrong name, and then InnerException is the ResourceNotFoundException. PendingIndex names an index that held the wait up, which can happen with a table that reads Active.

A single poll that runs out of AttemptTimeout on its last attempt is no such end of a wait, and surfaces as the plain TimeoutException of the pipeline.

Constructors

TableNotActiveException(string, string, TableStatus?, string?, Exception?)

Initializes a new instance of the TableNotActiveException class.

public TableNotActiveException(string message, string tableName, TableStatus? lastStatus, string? pendingIndex = null, Exception? innerException = null)

Parameters

message string

The message.

tableName string

The name of the table.

lastStatus TableStatus?

The status the last look found, or null if it did not find the table.

pendingIndex string

The global secondary index that was not active at the last look, or null if there was none.

innerException Exception

The failure of the last look, if any.

Exceptions

ArgumentNullException

tableName is null.

Properties

LastStatus

Gets the status of the table at the last look, or null if that look did not find the table. A response without a description, or with a status this library does not know, is Unknown.

public TableStatus? LastStatus { get; }

Property Value

TableStatus?

PendingIndex

Gets the name of a global secondary index that was not ACTIVE at the last look, the first one the description lists if there are several, then the first that an entity declares and the description does not list, which the message says, or null if none held the wait up. A table reads Active while an index backfills, so this can be set beside that status.

public string? PendingIndex { get; }

Property Value

string

TableName

Gets the name of the table, or its ARN, as the table was opened.

public string TableName { get; }

Property Value

string