FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

Remove `CompatibilityMode` case for "1" and `compatibilityModeRuntimeOptions["1"]`

Open markfields opened this issue 11 months ago • 2 comments

(Someone correct me if I'm wrong)

We don't intend to support collaboration between 1.x and 3.0 clients. Both are compatible with 2.x, so users can be migrated over the 2.x timeframe.

So in 3.0 we can remove "1" from the union type CompatibilityMode (maybe should change the structure of that type to make it easier to deprecate/remove in the future), and remove compatibilityModeRuntimeOptions["1"] from https://github.com/microsoft/FluidFramework/blob/main/packages/framework/fluid-static/src/compatibilityConfiguration.ts

Then we'll be able to clean up the code supporting those old configurations which aren't otherwise used.

markfields avatar Dec 10 '24 22:12 markfields

@vladsud - On second thought, I don't think this has to happen at the 3.0.0 moment, what do you think? Here are the options it overrides:

"1": {
	// 1.x clients are compatible with TurnBased flushing, but here we elect to remain on Immediate flush mode
	// as a work-around for inability to send batches larger than 1Mb. Immediate flushing keeps batches smaller as
	// fewer messages will be included per flush.
	flushMode: FlushMode.Immediate,
	// Op compression is on by default but introduces a new type of op which is not compatible with 1.x clients.
	compressionOptions: {
		minimumBatchSizeInBytes: Number.POSITIVE_INFINITY, // disabled
		compressionAlgorithm: CompressionAlgorithms.lz4,
	},
	// Grouped batching is on by default but introduces a new type of op which is not compatible with 1.x clients.
	enableGroupedBatching: false,
	// TODO: Include explicit disables for things that are currently off-by-default?

	// Explicitly disable running Sweep in compat mode "1". Sweep is supported only in 2.x. So, when 1.x and 2.x
	// clients are running in parallel, running sweep will fail 1.x clients.
	gcOptions: { enableGCSweep: undefined },
},

flushMode and enableGroupedBatching are being removed from the Legacy-Alpha options list in 2.20 (tracked in sub-issues under #22835). compressionOptions and gcOptions aren't changing, so it's not like this is blocking some other breaking change.

If you agree, I'll close this and track it in ADO. cc @jason-ha @ChumpChief

markfields avatar Dec 11 '24 04:12 markfields

This issue has been automatically marked as stale because it has had no activity for 180 days. It will be closed if no further activity occurs within 8 days of this comment. Thank you for your contributions to Fluid Framework!