Skip to content

Conversation

@xinlian12
Copy link
Member

Remove public config for transactional batch, will add back when the whole feature is ready

Copilot AI review requested due to automatic review settings January 22, 2026 17:50
@xinlian12 xinlian12 requested review from a team and kirankumarkolli as code owners January 22, 2026 17:50
@xinlian12 xinlian12 force-pushed the hidePublicConfigForTransactionalBatch branch from fdcfc7d to 5b1b321 Compare January 22, 2026 17:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request removes the public configuration for the transactional batch feature in the Azure Cosmos DB Spark connector, with the intention to add it back when fully ready. The PR aims to disable the spark.cosmos.write.bulk.transactional configuration option while keeping the underlying implementation intact.

Changes:

  • Removed comprehensive test file (TransactionalBatchITest.scala) containing all transactional batch tests
  • Commented out config name constant and removed from validation set in CosmosConfig.scala
  • Hardcoded bulkTransactional option to false to disable the feature
  • Removed transactional batch documentation from user-facing guides

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
sdk/cosmos/azure-cosmos-spark_3/src/test/scala/com/azure/cosmos/spark/TransactionalBatchITest.scala Deleted entire test file with 1000+ lines of transactional batch tests
sdk/cosmos/azure-cosmos-spark_3/src/main/scala/com/azure/cosmos/spark/CosmosConfig.scala Commented out config constant, removed from validation set, hardcoded to false
sdk/cosmos/azure-cosmos-spark_3/docs/scenarios/Ingestion.md Removed transactional batch documentation section (69 lines)
sdk/cosmos/azure-cosmos-spark_3/docs/configuration-reference.md Removed transactional batch config entry from reference table
Comments suppressed due to low confidence (1)

sdk/cosmos/azure-cosmos-spark_3/src/main/scala/com/azure/cosmos/spark/CosmosConfig.scala:1773

  • The bulkTransactionalOpt is hardcoded to Some(false), but the bulkTransactional ConfigEntry definition on line 1492 still exists and references the commented-out config name. This creates dead code. To properly disable the feature, either remove the ConfigEntry definition entirely or keep the config name defined (uncommented) but ignore user-provided values by always using Some(false) here.
    assert(bulkEnabledOpt.isDefined, s"Parameter '${CosmosConfigNames.WriteBulkEnabled}' is missing.")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant