Skip to content

Move tx-queue/acquire-lock call to process-transactions#22

Merged
cap10morgan merged 1 commit intomainfrom
11-21-Move_tx-queue/acquire-lock_call_to_process-transactions
Nov 21, 2023
Merged

Move tx-queue/acquire-lock call to process-transactions#22
cap10morgan merged 1 commit intomainfrom
11-21-Move_tx-queue/acquire-lock_call_to_process-transactions

Conversation

@cap10morgan
Copy link
Contributor

@cap10morgan cap10morgan commented Nov 21, 2023

The expected args aren't available where it was being called before.

Fixes https://github.com/fluree/core/issues/64

The expected args aren't available where it was being called before.
Copy link
Contributor Author

@cap10morgan cap10morgan mentioned this pull request Nov 21, 2023
;; TODO - push-consensus will only work if a leader. As leader can only do txns for the moment this is OK
;; TODO - but once the work gets spread out to other servers it will have to push the commit to the leader
(let [processed* (conj processed tx-id)]
(when (acquire-lock ledger-id tx-id)
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens to the queue when the lock can't be acquired?

I'd guess it means that some other server has the lock, but how can that be if this ledger is my-responsibility? Does the queue just not get processed then?

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'm not sure, to be honest. But where it was being called before if the lock acquisition failed it wouldn't even call this fn, which I think is basically the same behavior it has now.

Copy link
Contributor

@zonotope zonotope left a comment

Choose a reason for hiding this comment

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

🍉

Copy link
Contributor Author

cap10morgan commented Nov 21, 2023

Merge activity

Base automatically changed from 11-21-Add_run-dev_alias to main November 21, 2023 18:21
@cap10morgan cap10morgan merged commit 57e7a86 into main Nov 21, 2023
@cap10morgan cap10morgan deleted the 11-21-Move_tx-queue/acquire-lock_call_to_process-transactions branch November 21, 2023 18:21
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