Skip to content

Feature/autorelation transaction - #48

Merged
nozoz merged 7 commits into
developfrom
feature/autorelation-transaction
Sep 16, 2026
Merged

nozoz merged 7 commits into
developfrom
feature/autorelation-transaction

Conversation

@nozoz

@nozoz nozoz commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Lagde en MongoTransactions klasse som har en hjelper funksjon som tar en funksjon og kjører den inni en MongoDB transaksjon. Om vi får en transient mongodb feil (en race condition på hvem som oppdaterer ressursen først) så prøver vi må nytt opp til 5 ganger.

ResourceWritePipeline tar i bruk MongoTransactions slik at relasjons kantene vi genererer basert på hvilken ressurser som ble lagd/slettet/oppdatert dukker opp samtidig i databasen.

…ective writes only

Rename run to inTransaction, restore the join-without-retry and non-null
explanations, fix the logger import, and remove the retry helper and unused
transaction template from ResponseEventService. ResourceStore.applyAll now
states its return type and documents that the returned list is only
trustworthy inside a transaction. ResourceTimestamp sits next to
ResourceIdentity.
ResourceStoreIT pins the returned list for stale saves, duplicate ids,
stale deletes, deletes of missing ids and the millisecond boundary.
AutoRelationIT covers an old and a new version in one batch and a stale
tombstone. ResourceWritePipelineIT covers rollback when the edge write
fails, a nested call joining the outer transaction, and an update or insert
landing between the pre-read and the write.
@nozoz
nozoz merged commit 248fefb into develop Sep 16, 2026
2 of 3 checks passed
@nozoz
nozoz deleted the feature/autorelation-transaction branch September 16, 2026 12:29
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.

2 participants