- Apr 2024
-
Local file Local file
-
One transaction at a time would generallynot lead either to much work or muchbusiness, and besides, a transaction cannot always be completedwhile you wait. The consequence is that we arrive at a num-ber of transactions going on simultaneously. When we nowreach the stage of too much work, then we must find waysand means to supplement our energy. Thus we arrive at amultitude of transactions by means of concerted action.
While using different verbiage, Kaiser is talking about the idea of information overload here and providing the means to tame it by appropriately breaking it up into pieces upon which we might better apply our energies to turn it into something.
-
The unit of our activity is the single transac-tion. The activity of the large'st organisationis but a multiple of the single transaction
Here in rough form is a different definition of C. Hidalgo's personbyte and firmbyte idea.
-
- Mar 2024
-
www.pcmag.com www.pcmag.com
-
You can split transactions among multiple tags or categories and exclude them from reports and the Spending Plan.
-
- Aug 2023
-
github.com github.com
-
I think the problem with after_destroy is that it is triggered before the database commits. This means the change may not yet be seen by other processes querying the database; it also means the change could be rolled back, and never actually commited. Since shrine deletes the attachment in this hook, that would mean it might delete the attachment prematurely, or even delete the attachment when the record never ends up destroyed in the database at all (in case of rollback), which would be bad. For shrine's logic to work as expected here, it really does need to be triggered only after the DB commit in which the model destroy is committed.
-
- Feb 2023
-
guides.rubyonrails.org guides.rubyonrails.org
-
If you already have an instance of your model, you can start a transaction and acquire the lock in one go using the following code: book = Book.first book.with_lock do # This block is called within a transaction, # book is already locked. book.increment!(:views) end
-
- Apr 2022
-
github.com github.com
-
after_commit { puts "We're all done!" }
Notice the order: this is printed last, after the outer (real) transaction is committed, not when the inner "transaction" block finishes without error.
-
-
evilmartians.com evilmartians.com
-
These callbacks are smart enough to run after the final (outer) transaction* is committed. * Usually, there is one real transaction and nested transactions are implemented through savepoints (see, for example, PostgreSQL).
important qualification: the outer transaction, the (only) real transaction
-
-
github.com github.com
-
These callbacks are focused on the transactions, instead of specific model actions.
At least I think this is talking about this as limitation/problem.
The limitation/problem being that it's not good/useful for performing after-transaction code only for specific actions.
But the next sentence "This is beneficial..." seems contradictory, so I'm a bit confused/unclear of what the intention is...
Looking at this project more, it doesn't appear to solve the "after-transaction code only for specific actions" problem like I initially thought it did (and like https://github.com/grosser/ar_after_transaction does), so I believe I was mistaken. Still not sure what is meant by "instead of specific model actions". Are they claiming that "before_commit_on_create" for example is a "specific model action"? (hardly!) That seems almost identical to the (not specific enough) callbacks provided natively by Rails. Oh yeah, I guess they do point out that Rails 3 adds this functionality, so this gem is only needed for Rails 2.
-
-
rails-bestpractices.com rails-bestpractices.com
-
In this case, the worker process query the newly-created notification before main process commits the transaction, it will raise NotFoundError, because transaction in worker process can't read uncommitted notification from transaction in main process.
-
- Feb 2021
-
-
However, sometimes actions can't be rolled back and it is unfortunately unavoidable. For example, consider when we send emails during the call to process. If we send before saving a record and that record fails to save what do we do? We can't unsend that email.
-
- Oct 2020
-
github.com github.com
-
I too have been confused by behavior like this. Perhaps a clearly defined way to isolate atomic units with synchronous reactivity would help those of us still working through the idiosyncrasies of reactivity.
-
- Aug 2020
-
final-form.org final-form.org
-
Allows batch updates by silencing notifications while the fn is running. Example: form.batch(() => { form.change('firstName', 'Erik') // listeners not notified form.change('lastName', 'Rasmussen') // listeners not notified }) // NOW all listeners notified
-
- Jun 2020
-
github.com github.com
-
No need for DatabaseCleaner (rolling back transactions are usually faster than truncate).
-
-
-
api.rubyonrails.org api.rubyonrails.org
-
transaction calls can be nested. By default, this makes all database statements in the nested transaction block become part of the parent transaction. For example, the following behavior may be surprising: User.transaction do User.create(username: 'Kotori') User.transaction do User.create(username: 'Nemu') raise ActiveRecord::Rollback end end creates both “Kotori” and “Nemu”. Reason is the ActiveRecord::Rollback exception in the nested block does not issue a ROLLBACK. Since these exceptions are captured in transaction blocks, the parent block does not see it and the real transaction is committed.
How is this okay??
When would it ever be the desired/intended behavior for a
raise ActiveRecord::Rollback
to have absolutely no effect? What good is the transaction then??What happened to the principle of least surprise?
Is there any reason we shouldn't just always use
requires_new: true
?If, like they say, the inner transaction "become[s] part of the parent transaction", then if anything, it should roll back the parent transaction too — not roll back nothing.
-
One workaround is to begin a transaction on each class whose models you alter:
-
- Apr 2020
-
stackoverflow.com stackoverflow.com
- Sep 2019
-
www.unifiedinfotech.net www.unifiedinfotech.net
-
Expert Smart Contract Development Guide for 2019
For those of you who don’t know, a smart contract is a self-executing contract that digitally facilitates, verifies and enforces the agreed terms between two or more parties.
-
- Jul 2019
-
www.canlii.org www.canlii.org
-
It seems to me that in considering the purpose of a subset of the entire series of transactions, Justice Paris had in mind the correct test. As this Court said in MacKay v. Canada, 2008 FCA 105 (CanLII) at paragraph 25: The existence of a bona fide non-tax purpose for a series of transactions does not exclude the possibility that the primary purpose of one or more transactions within the series is to obtain a tax benefit.
Existence of a bona fide non-tax purpose for a series of transactions does not exclude possibility that the primary purpose of one of the transactions in the series is to obtain a tax benefit.
-
- Jun 2016
-
Local file Local file
-
As Katzen (1980, p. 191) notes in heranalysis of early volumes of thePhilosophical Transac-tions:. . . no attempt is made to give prominence to the author ofthe article . . . there is generally no reference at all to theauthor in the heading that signals a new communication. Ifthe author is referred to in the title, it is likely to be in anoblique form . . . we are at the threshold between anony-mous and eponymous authorship
Study of authorship in Philosophical transactions
-