Skip to content

Transactions: Allow re module#41

Merged
dumbbell merged 1 commit into
mainfrom
allow-re-module-in-tx
Feb 3, 2022
Merged

Transactions: Allow re module#41
dumbbell merged 1 commit into
mainfrom
allow-re-module-in-tx

Conversation

@dumbbell

@dumbbell dumbbell commented Feb 3, 2022

Copy link
Copy Markdown
Collaborator

However, re:version/0 is denied: it could return a different result on different nodes.

For re:compile/{1,2}, it is more complicated. The compiled regex could be very specific to a version of the PCRE engine and not portable to another node. It is fine to compile a regex and use it in the same function (transaction). But storing it in Khepri and using it on another node than the one which compiled it could break. This API is still allowed because there is no way for us to prevent a compiled regex to come from outside a transaction function or to be stored by khepri_machine:put/3 for instance.

However, `re:version/0` is denied: it could return a different result on
different nodes.

For `re:compile/{1,2}`, it is more complicated. The compiled regex could
be very specific to a version of the PCRE engine and not portable to
another node. It is fine to compile a regex and use it in the same
function (transaction). But storing it in Khepri and using it on another
node than the one which compiled it could break. This API is still
allowed because there is no way for us to prevent a compiled regex to
come from outside a transaction function or to be stored by
`khepri_machine:put/3` for instance.
@dumbbell dumbbell added the enhancement New feature or request label Feb 3, 2022
@dumbbell dumbbell self-assigned this Feb 3, 2022
@coveralls

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 284

  • 0 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.06%) to 81.87%

Totals Coverage Status
Change from base Build 280: 0.06%
Covered Lines: 1296
Relevant Lines: 1583

💛 - Coveralls

@coveralls

coveralls commented Feb 3, 2022

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 284

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.06%) to 81.87%

Totals Coverage Status
Change from base Build 280: 0.06%
Covered Lines: 1296
Relevant Lines: 1583

💛 - Coveralls

@dumbbell
dumbbell marked this pull request as ready for review February 3, 2022 08:52
@dumbbell
dumbbell merged commit 856ab33 into main Feb 3, 2022
@dumbbell
dumbbell deleted the allow-re-module-in-tx branch February 3, 2022 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants