ReplicaStats

class borneo.ReplicaStats[source]

Bases: object

ReplicaStats contains information about replica lag for a specific replica.

Replica lag is a measure of how current this table is relative to the remote replica and indicates that this table has not yet received updates that happened within the lag period.

For example, if the replica lag is 5,000 milliseconds(5 seconds), then this table will have all updates that occurred at the remote replica that are more than 5 seconds old.

Replica lag is calculated based on how long it took for the latest operation from the table at the remote replica to be replayed at this table. If there have been no application writes for the table at the remote replica, the service uses other mechanisms to calculate an approximation of the lag, and the lag statistic will still be available.

Added in version 5.4.2.

Methods Summary

get_collection_time()

Returns the time the replica lag collection was performed.

get_collection_time_str()

Returns the collection time as an ISO 8601 formatted string

get_replica_lag()

Returns the replica lag collected at the specified time in milliseconds

Methods Documentation

get_collection_time()[source]

Returns the time the replica lag collection was performed. The value is a time stamp in milliseconds since the Epoch

Returns:

the time

Return type:

int

get_collection_time_str()[source]

Returns the collection time as an ISO 8601 formatted string

Returns:

the time

Return type:

str

get_replica_lag()[source]

Returns the replica lag collected at the specified time in milliseconds

Returns:

the lag

Return type:

int