Repository navigation
Count each logical batch job's success once #760
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
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
5684249
Benchmark SQL batch result storage and retain the measurements
binaryfire 61e3873
Plan duplicate-safe batch accounting with per-job results
binaryfire 62c5e43
Document chain reuse and transaction-safe pruning
binaryfire 144279c
Pin the batch storage comparison to its measured baseline
binaryfire eb22f0d
Share generation of missing table migrations
binaryfire 81c776c
Generate the configured batch and results table migrations
binaryfire 4e8c78d
Install the batch counters and per-job results schema
binaryfire fc09dc0
Count logical batch results atomically and preserve retry lookup IDs
binaryfire 095790c
Cover batch lifecycle, queue identity and configuration contracts
binaryfire 2bb9901
Update Horizon batch fixtures and verify retry identity
binaryfire f0c3747
Exercise overlapping batch updates and pruning on all SQL drivers
binaryfire 7f299cb
Reproduce chain redelivery on the database queue
binaryfire 869413b
Document duplicate-safe batches and Laravel porting requirements
binaryfire f4f45c0
Return the batch total at the accounting write
binaryfire 27979c4
Retain the failed delivery UUID across Horizon retries
binaryfire c7f434f
Deliver completion callbacks for the batch that finished
binaryfire 1435bb7
Exercise outstanding retry membership on fake batches
binaryfire 18da1dc
Report cache migration creation only when a file was written
binaryfire 24e8285
Document batch completion snapshots and retry IDs
binaryfire af70b02
Identify the exact baseline for the batch benchmark
binaryfire 03201eb
Retry the outstanding batch delivery from the Horizon dashboard
binaryfire b60b41e
Clarify stale batch totals and missing-model retry precedence
binaryfire 934aed8
Clarify the batch repository extension point
binaryfire 0f951ed
Identify the unindexed benchmark variant and batch key representation
binaryfire b444364
Wait for the parent update when testing a PostgreSQL recovery
binaryfire File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
skeletons/hypervel/database/migrations/0001_01_01_000010_create_job_batch_results_table.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| use Hypervel\Database\Migrations\Migration; | ||
| use Hypervel\Database\Schema\Blueprint; | ||
| use Hypervel\Support\Facades\Schema; | ||
|
|
||
| return new class extends Migration { | ||
| /** | ||
| * Run the migrations. | ||
| */ | ||
| public function up(): void | ||
| { | ||
| Schema::create('job_batch_results', function (Blueprint $table) { | ||
| $table->string('batch_id'); | ||
| $table->char('job_id_hash', 32); | ||
| $table->longText('retry_id')->nullable(); | ||
| $table->primary(['batch_id', 'job_id_hash']); | ||
|
|
||
| if (in_array(Schema::getConnection()->getDriverName(), ['pgsql', 'sqlite'], true)) { | ||
| $table->index('batch_id')->whereNotNull('retry_id'); | ||
| } | ||
| }); | ||
| } | ||
|
|
||
| /** | ||
| * Reverse the migrations. | ||
| */ | ||
| public function down(): void | ||
| { | ||
| Schema::dropIfExists('job_batch_results'); | ||
| } | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1: This only changes the original create migration, so applications that already ran it will not gain this column; the new results migration only creates the child table.
DatabaseBatchRepositorynow reads and writesoutstanding_failed_jobs, causing batch operations on those schemas to fail; add a forward migration that updates existing batch tables and failure data.Prompt for AI agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hypervel 0.4 uses a fresh schema. Its batch and result migrations create both tables in their final form. Applications porting a retained Laravel database should follow the framework-table instructions in the porting guide.