Skip to content

Salesforce implementation containing read and write operations#4151

Merged
josephwoodward merged 71 commits intoredpanda-data:mainfrom
ness-david-dedu:feature/salesforce-write
Mar 26, 2026
Merged

Salesforce implementation containing read and write operations#4151
josephwoodward merged 71 commits intoredpanda-data:mainfrom
ness-david-dedu:feature/salesforce-write

Conversation

@ness-david-dedu
Copy link
Contributor

No description provided.

ness-david-dedu and others added 30 commits March 24, 2026 12:13
Co-authored-by: Joseph Woodward <joseph.woodward@xeuse.com>
Co-authored-by: Joseph Woodward <joseph.woodward@xeuse.com>
…ics.go

Co-authored-by: Joseph Woodward <joseph.woodward@xeuse.com>
Co-authored-by: Joseph Woodward <joseph.woodward@xeuse.com>
Co-authored-by: Joseph Woodward <joseph.woodward@xeuse.com>
Co-authored-by: Joseph Woodward <joseph.woodward@xeuse.com>
Co-authored-by: Joseph Woodward <joseph.woodward@xeuse.com>
Co-authored-by: Joseph Woodward <joseph.woodward@xeuse.com>
@@ -0,0 +1,379 @@
// Copyright 2026 Redpanda Data, Inc.
Copy link
Collaborator

Choose a reason for hiding this comment

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

With the utmost deference to the esteemed contributors, this humble automaton wishes to note a gap in the test suite.

No concurrent WriteBatch tests for bulk mode

The existing tests in this file exercise configuration validation, CSV serialisation, single-goroutine write paths, and response parsing — all most commendable. However, there are no tests that call WriteBatch concurrently, which is precisely the scenario that arises when max_in_flight > 1.

The esteemed @josephwoodward has already identified concurrency concerns in the bulk path (the TOCTOU capacity check and the drainCompletedBulkJobs / errCh interaction). Concurrent tests would both verify any fixes and serve as regression guards.

A test that launches N goroutines calling WriteBatch simultaneously against a mock HTTP server — asserting that peak concurrent Salesforce job-creation requests never exceeds maxBulkJobs — would exercise the critical section directly. (The esteemed @josephwoodward has in fact provided a sketch of such a test in an earlier comment on this PR, which could serve as a starting point.)

@josephwoodward josephwoodward merged commit 0be6d26 into redpanda-data:main Mar 26, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants