Skip to content
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

New Golem specific host functions for implementing the Transaction API #11

Merged
merged 4 commits into from
Mar 26, 2024

Conversation


/// Overrides the current retry policy associated with the worker. Following this call, `get-retry-policy` will return the
/// new retry policy.
set-retry-policy: func(new-retry-policy: retry-policy) -> ();
Copy link
Contributor

@jdegoes jdegoes Mar 26, 2024

Choose a reason for hiding this comment

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

In theory this could be a resource, too, where committing would restore the retry policy to its value at the creation of the resource.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I was thinking about it, but I think it is confusing if you create multiple ones simultaneously, as it is not guaranteed that you drop them in opposite order.


/// Sets the worker's current persistence level. This can increase the performance of execution in cases where durable
/// execution is not required.
set-oplog-persistence-level: func(new-persistence-level: persistence-level) -> ();
Copy link
Contributor

Choose a reason for hiding this comment

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

In theory this could be a resource, too, where committing would restore the persistence level to its value at the creation of the resource.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking not to for the same reason as for the retry policy

/// True means side-effects are treated idempotent and Golem guarantees at-least-once semantics.
/// In case of false the executor provides at-most-once semantics, failing the worker in case it is
/// not known if the side effect was already executed.
set-idempotence-mode: func(idempotent: bool) -> ();
Copy link
Contributor

Choose a reason for hiding this comment

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

In theory this could be a resource, too, where committing would restore the idempotence level to its value at the creation of the resource.

@jdegoes jdegoes merged commit e299225 into main Mar 26, 2024
2 checks passed
@jdegoes jdegoes deleted the transaction-api branch March 26, 2024 14:19
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