Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[For 2.20] Remove IContainerRuntimeOptions.flushmode #23337

Merged
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .changeset/cruel-horses-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@fluidframework/container-runtime": minor
---
---
"section": legacy
---

IContainerRuntimeOptions.flushMode has been removed

This option allowed an application to specify whether to flush ops "immediately" (literally 1-by-1) or "turn-based"
(batched by JS turn). `Immediate` mode has been deprecated and should no longer be used.

Now there is only one choice, which is the default `TurnBased` mode, so the `flushMode` option can be removed.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export enum ContainerMessageType {

// @alpha @deprecated
export class ContainerRuntime extends TypedEventEmitter<IContainerRuntimeEvents> implements IContainerRuntime, IRuntime, ISummarizerRuntime, ISummarizerInternalsProvider, IProvideFluidHandleContext {
protected constructor(context: IContainerContext, registry: IFluidDataStoreRegistry, metadata: IContainerRuntimeMetadata | undefined, electedSummarizerData: ISerializedElection | undefined, chunks: [string, string[]][], dataStoreAliasMap: [string, string][], runtimeOptions: Readonly<Required<Omit<IContainerRuntimeOptions, "flushMode" | "enableGroupedBatching">> & IContainerRuntimeOptions>, containerScope: FluidObject, baseLogger: ITelemetryBaseLogger, existing: boolean, blobManagerSnapshot: IBlobManagerLoadInfo, _storage: IDocumentStorageService, createIdCompressor: () => Promise<IIdCompressor & IIdCompressorCore>, documentsSchemaController: DocumentsSchemaController, featureGatesForTelemetry: Record<string, boolean | number | undefined>, provideEntryPoint: (containerRuntime: IContainerRuntime) => Promise<FluidObject>, requestHandler?: ((request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>) | undefined, summaryConfiguration?: ISummaryConfiguration, recentBatchInfo?: [number, string][]);
protected constructor(context: IContainerContext, registry: IFluidDataStoreRegistry, metadata: IContainerRuntimeMetadata | undefined, electedSummarizerData: ISerializedElection | undefined, chunks: [string, string[]][], dataStoreAliasMap: [string, string][], runtimeOptions: Readonly<Required<IContainerRuntimeOptions>>, containerScope: FluidObject, baseLogger: ITelemetryBaseLogger, existing: boolean, blobManagerSnapshot: IBlobManagerLoadInfo, _storage: IDocumentStorageService, createIdCompressor: () => Promise<IIdCompressor & IIdCompressorCore>, documentsSchemaController: DocumentsSchemaController, featureGatesForTelemetry: Record<string, boolean | number | undefined>, provideEntryPoint: (containerRuntime: IContainerRuntime) => Promise<FluidObject>, requestHandler?: ((request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>) | undefined, summaryConfiguration?: ISummaryConfiguration, recentBatchInfo?: [number, string][]);
// (undocumented)
protected addContainerStateToSummary(summaryTree: ISummaryTreeWithStats, fullTree: boolean, trackState: boolean, telemetryContext?: ITelemetryContext): void;
addedGCOutboundRoute(fromPath: string, toPath: string, messageTimestampMs?: number): void;
Expand Down Expand Up @@ -342,8 +342,6 @@ export interface IContainerRuntimeOptions {
readonly compressionOptions?: ICompressionRuntimeOptions;
readonly enableRuntimeIdCompressor?: IdCompressorMode;
readonly explicitSchemaControl?: boolean;
// @deprecated
readonly flushMode?: FlushMode;
// (undocumented)
readonly gcOptions?: IGCRuntimeOptions;
readonly loadSequenceNumberVerification?: "close" | "log" | "bypass";
Expand Down
15 changes: 2 additions & 13 deletions packages/runtime/container-runtime/src/containerRuntime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,15 +470,7 @@ export interface IContainerRuntimeOptions {
* 3. "bypass" will skip the check entirely. This is not recommended.
*/
readonly loadSequenceNumberVerification?: "close" | "log" | "bypass";
/**
* Sets the flush mode for the runtime. In Immediate flush mode the runtime will immediately
* send all operations to the driver layer, while in TurnBased the operations will be buffered
* and then sent them as a single batch at the end of the turn.
* By default, flush mode is TurnBased.
*
* @deprecated Only the default value TurnBased is supported. This option will be removed in the future.
*/
readonly flushMode?: FlushMode;

/**
* Enables the runtime to compress ops. See {@link ICompressionRuntimeOptions}.
*/
Expand Down Expand Up @@ -1512,10 +1504,7 @@ export class ContainerRuntime
electedSummarizerData: ISerializedElection | undefined,
chunks: [string, string[]][],
dataStoreAliasMap: [string, string][],
runtimeOptions: Readonly<
Required<Omit<IContainerRuntimeOptions, "flushMode" | "enableGroupedBatching">> &
IContainerRuntimeOptions // Let flushMode and enabledGroupedBatching be optional now since they're soon to be removed
>,
runtimeOptions: Readonly<Required<IContainerRuntimeOptions>>,
markfields marked this conversation as resolved.
Show resolved Hide resolved
private readonly containerScope: FluidObject,
// Create a custom ITelemetryBaseLogger to output telemetry events.
public readonly baseLogger: ITelemetryBaseLogger,
Expand Down
Loading