Skip to main content

EpochTracker Class

In ODSP, the concept of "epoch" refers to binary updates to files. For example, this might include using version restore, or if the user downloads a Fluid file and then uploads it again. These result in the epoch value being incremented.

The implications of these binary updates is that the Fluid state is disrupted: the sequence number might go backwards, the data might be inconsistent with the latest state of collaboration, etc. As a result, it's not safe to continue collaboration across an epoch change. We need to detect these epoch changes and error out from the collaboration.

This class is a wrapper around fetch calls. It adds epoch to the request made so that the server can match it with its epoch value in order to match the version. It also validates the epoch value received in response of fetch calls. If the epoch does not match, then it also clears all the cached entries for the given container.

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/odsp-driver/legacy.

For more information about our API support guarantees, see here.

Signature

export declare class EpochTracker implements IPersistedFileCache

Implements: IPersistedFileCache

Constructors

Constructor Alerts Description
(constructor)(cache, fileEntry, logger, clientIsSummarizer) Alpha Constructs a new instance of the EpochTracker class

Properties

Property Alerts Modifiers Type Description
cache Alpha readonly IPersistedCache
clientIsSummarizer Alpha optional, readonly boolean | undefined
fileEntry Alpha readonly IFileEntry
fluidEpoch Alpha readonly string | undefined
logger Alpha readonly ITelemetryLoggerExt
rateLimiter Alpha readonly RateLimiter

Constructor Details

(constructor)

Constructs a new instance of the EpochTracker class

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

constructor(cache: IPersistedCache, fileEntry: IFileEntry, logger: ITelemetryLoggerExt, clientIsSummarizer?: boolean | undefined);

Parameters

Parameter Modifiers Type Description
cache IPersistedCache
fileEntry IFileEntry
logger ITelemetryLoggerExt
clientIsSummarizer optional boolean | undefined

Property Details

cache

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

protected readonly cache: IPersistedCache;

Type: IPersistedCache

clientIsSummarizer

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

protected readonly clientIsSummarizer?: boolean | undefined;

Type: boolean | undefined

fileEntry

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

protected readonly fileEntry: IFileEntry;

Type: IFileEntry

fluidEpoch

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

get fluidEpoch(): string | undefined;

Type: string | undefined

logger

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

protected readonly logger: ITelemetryLoggerExt;

Type: ITelemetryLoggerExt

rateLimiter

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

readonly rateLimiter: RateLimiter;

Type: RateLimiter