Displaying 20 results from an estimated 40000 matches similar to: "understanding rails transactions support."
2006 May 19
7
AR transactions and isolation levels
I''m trying to create a sequence with no gaps in my db (contrived
example, but should work out the same as my real one), and believe
db-managed transactions are the way to go about this.
It''s my first real ''go'' at transactions, so I may be mistaken about
how things really work.
Anyway.. Consider this example code:
Class Invoice < ActiveRecord::Base
def
2011 Mar 06
1
transaction list transformation to use rpart.
So there are a couple parts to this question. I am trying to implement the
rpart/random forest algorithms on a transaction lists. That is to say i am
trying to train models in order to deduce what are the most predictive
transactions within a customers history in order apply this model to future
test data and identify accounting irregularities(ie. this account had x and
y so they should have also
2010 Oct 27
0
[LLVMdev] interest in support for Transactional Memory?
Hi Torvald,
On Oct 27, 2010, at 8:01, Torvald Riegel wrote:
> On Tuesday 26 October 2010 14:33:02 Duncan Sands wrote:
>>> transaction properties (eg, virtually atomic + isolated execution) for
>>> ordinary program code. Thus, to make incrementing a counter thread-safe,
>>> you could say __transaction { counter++; } and the compiler would
>>> transform this
2006 Oct 03
2
Rails transactions issue with rollback.
Hi,
I have a transaction in which a duplicate key exception is being thrown
by MySQL. I assume this happens when I try to do a save. The problem
is that before the save, I do a destroy on another object as part of the
transaction. Catching the exception by doing this,
User.transaction do
begin
objA.destroy
objB.save <-- causing exception
rescue Exception => exc
2010 Oct 27
2
[LLVMdev] interest in support for Transactional Memory?
On Tuesday 26 October 2010 14:33:02 Duncan Sands wrote:
> > transaction properties (eg, virtually atomic + isolated execution) for
> > ordinary program code. Thus, to make incrementing a counter thread-safe,
> > you could say __transaction { counter++; } and the compiler would
> > transform this code so that it uses a TM library, which in turn does
> > concurrency
2010 Oct 26
0
[LLVMdev] interest in support for Transactional Memory?
Hi Torvald,
> I would like to know whether the community is interested in getting support
> for Transactional Memory (TM) merged in upstream LLVM.
I guess not :(
TM basically gives you
> transaction properties (eg, virtually atomic + isolated execution) for
> ordinary program code. Thus, to make incrementing a counter thread-safe, you
> could say __transaction { counter++; } and
2010 Oct 01
2
[LLVMdev] interest in support for Transactional Memory?
Hi,
I would like to know whether the community is interested in getting support
for Transactional Memory (TM) merged in upstream LLVM. TM basically gives you
transaction properties (eg, virtually atomic + isolated execution) for
ordinary program code. Thus, to make incrementing a counter thread-safe, you
could say __transaction { counter++; } and the compiler would transform this
code so
2012 Jun 25
1
Arules - predict function issues - subscript out of bounds
Hi,
I'm doing a Market Basket Analysis in which I have a list of transaction
id's in column 2 and transactions(product names) in column 1. I read this
into a transaction file using a
txn<-read.transaction(file="data.csv",format='single', rm.duplicates=F,
cols=c(1,2))
If I want to use the apriori algorithm everything seems to be running fine.
However it is when I want
2007 Nov 29
4
Rollbacks, Sqlite3 bug. Has this been reintroduced ?
Hey,
I just updated from the edge and it looks like this _issue_ has resurfaced.
Yesterday things were working (stories and specs).
No code base changes, only rspec and rspec_on_rails
After updating today I now need to set <config.txn...fixtures> to false in
the spec_helper.rb
to get the specs running, the stories are fine. Looks like the fixture
loading is trying to start a txn.
I
2012 Oct 24
1
Uniqueness and sql serialize
Hi fellow programmers,
I was looking for how to keep integrity in some financial transactions and
I saw this "This could even happen if you use transactions with the
‘serializable’ isolation level." in the uniqueness page
http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html#method-i-validates_uniqueness_of.
How this is possible with the serializablo
2010 Dec 08
2
Bug in nested transactions in rails 2.3.x
Hello!
According to ActiveRecord transactions documentation,
User.transaction do
User.create(:username => ''Kotori'')
User.transaction(:requires_new => true) do
User.create(:username => ''Nemu'')
raise ActiveRecord::Rollback
end
end
User.find(:all) # => Returns only Kotori
But I get both records in database (tested on
2006 Aug 15
1
rails and MSSQL transactions
Hello,
I have rails using a MSSQL db. The set up works fine with low volume,
but with 2+ requests/second I keep on getting the following error:
DBI::DatabaseError: Execute
OLE error code:80004005 in Microsoft OLE DB Provider for SQL Server
Cannot create new connection because in manual or distributed
transaction mode.
HRESULT error code:0x80020009
Exception occurred.: SELECT
2007 Apr 25
0
Revisiting XenD / XenStored performance / scalability issues
Waay back at the end of 3.0.3 dev cycle I brought up the issue of XenD
running far too many xenstore transactions per-request
http://lists.xensource.com/archives/html/xen-devel/2006-10/msg00487.html
Short summary:
# nc -U /var/lib/xend/xend-socket
GET /xend/domain/test
Resulted in approx 16 xenstore transactions for a domain with one disk and
one NIC - this increases as # of devices
2006 May 23
4
''key not found'' problem with saving model object.
Hello,
I have the following structure:
model foo
has_many :bars:,
:dependent => true
end
model bar
belongs_to :foo
end
In my action, when i try to save foo:
def save
begin
f = foo.new
f.a = 5
begin
b = bar.new
b.a = 10
f.bars << b
rescue Exception => exc
...
end
f.save! <-- This does not happen
2006 Aug 01
1
Transactions within the Controller
Hi,
I have 2 models, how can I save both of them in one transaction?
I want to do something like this:
begin transaction
project.save
person.save
end transaction
The only examples I''ve seen is with saving 2 instances of the same model in a transaction.
thanks
scott.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2012 Jun 09
0
Re: ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the subclass: 'Transactions::DummyDdnlTransaction'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. P
FIXED: Transaction is a reserved word, and it cannot be used even
though I put it into its own module. So my guess is
Transactions::Transaction still somehow got resolved to the Rails
internal Transaction class.
Renamed the Transaction (and its subclasses) to Transact and it works fine now.
Thanks!
-- cmdjohnson
On Sat, Jun 9, 2012 at 3:08 AM, Commander Johnson
2007 Feb 20
0
transaction is started before a validation [c/o Rails-Core]
Hi all..
I was going to submit this as a bug...but thought I should learn more
first ...
When #save is called on an ActiveRecord a transaction is started to
catch any potential problems and try and recover from them.
This is cool.
But..
as a result of the Transaction module being mixed in quite late in the
game, the transactions system is one of the *first* things to get
initiated.........is
2005 Mar 31
4
Transactions
I cant seem to find much information apart from the basics on
transactions in rails. I have 5 nested transactions, and am performing
the following basic operations:
@whatever1.transaction do
@whatever2.transaction do
....
@whatever2.something = "foo"
@whatever1.something = "bar"
@whatever1.save
@whatever2.save
.....
end
end
((( I had tried using
2006 Jun 15
4
testing with transactions
Hello!
I experienced problems with testing transactions which are supposed to be
rolled back, but are not, because of transactional fixtures eliminating the
inner transaction. Can this be worked around somehow without turning off
transactional fixtures? Maybe savepoints can help this?
Does anyone have any experience with savepoints to achieve nested transaction
functionality? Both Postgres
2006 Jan 10
2
Transactions with multiple databases
hi,
i have problem with transactions and multiple databases.
Object1 and Object2 are two different models/databases with different
connections, when i use only
one model:
Object1.transaction do
object1.value1 = "123456"
object1.save
do_some_error
end
it''s ok, error is produced, nothing is commited and database is unchanged.
when i use 2 models, described at