Skip to content

Instantly share code, notes, and snippets.

@knowtheory
Created February 9, 2011 07:03
Show Gist options
  • Select an option

  • Save knowtheory/818078 to your computer and use it in GitHub Desktop.

Select an option

Save knowtheory/818078 to your computer and use it in GitHub Desktop.
Transactions
caelesta:dm knowtheory$ ruby trans_test2.rb
[2148303280] DO open_connection = 2157337300
[2148303280] TXN open_connection = 2157337300 (current = 4)
[2148303280] TXN close_connection(2157337300) (current = 4)
[2148303280] DO close_connection(2157337300) (current = 2157337300)
[2148303280] DO open_connection = 2157337300
[2148303280] TXN open_connection = 2157337300 (current = 4)
[2148303280] TXN close_connection(2157337300) (current = 4)
[2148303280] DO close_connection(2157337300) (current = 2157337300)
[2148303280] DO open_connection = 2157337300
[2148303280] TXN open_connection = 2157337300 (current = 4)
[2148303280] DO open_connection = 2157325960
[2148303280] TXN open_connection = 2157325960 (current = 4)
[2148303280] TXN close_connection(2157325960) (current = 4)
[2148303280] DO close_connection(2157325960) (current = 2157325960)
[2148303280] DO open_connection = 2157325960
[2148303280] TXN open_connection = 2157325960 (current = 4)
[2148303280] TXN close_connection(2157325960) (current = 4)
[2148303280] DO close_connection(2157325960) (current = 2157325960)
[2148303280] TXN close_connection(2157337300) (current = 4)
[2148303280] DO close_connection(2157337300) (current = 2157337300)
[2148303280] DO open_connection = 2157337300
[2148303280] TXN open_connection = 2157337300 (current = 4)
[2148303280] TXN close_connection(2157337300) (current = 4)
[2148303280] DO close_connection(2157337300) (current = 2157337300)
[2148303280] DO open_connection = 2157337300
[2148303280] TXN open_connection = 2157337300 (current = 4)
[2148303280] TXN close_connection(2157337300) (current = 4)
[2148303280] DO close_connection(2157337300) (current = 2157337300)
[2148303280] DO open_connection = 2157337300
[2148303280] TXN open_connection = 2157337300 (current = 4)
[2148303280] TXN close_connection(2157337300) (current = 4)
[2148303280] DO close_connection(2157337300) (current = 2157337300)
[2148303280] starting
#<Set: {#<DataObjects::Pooling::Pool<DataObjects::Mysql::Connection> available=2 used=0 size=8>}>
[2157294560] thread: txn 1 start
#<Set: {#<DataObjects::Pooling::Pool<DataObjects::Mysql::Connection> available=2 used=0 size=8>}>
[2157294560] TXN open_connection = 2157337300 (current = 2157337300)
[2157294560] TXN close_connection(2157337300) (current = 2157337300)
[2157294560] thread: txn 2 start
#<Set: {#<DataObjects::Pooling::Pool<DataObjects::Mysql::Connection> available=1 used=1 size=8>}>
[2157294560] TXN open_connection = 2157337300 (current = 2157337300)
[2157294560] TXN close_connection(2157337300) (current = 2157337300)
[2157294560] thread: txn 2 end
#<Set: {#<DataObjects::Pooling::Pool<DataObjects::Mysql::Connection> available=2 used=0 size=8>}>
[2157294560] thread: txn 1 end
#<Set: {#<DataObjects::Pooling::Pool<DataObjects::Mysql::Connection> available=3 used=0 size=8>}>
[2148303280] main: get
#<Set: {#<DataObjects::Pooling::Pool<DataObjects::Mysql::Connection> available=3 used=0 size=8>}>
[2148303280] DO open_connection = 2157337300
[2148303280] TXN open_connection = 2157337300 (current = 4)
[2157294560] thread: txn 1 start
#<Set: {#<DataObjects::Pooling::Pool<DataObjects::Mysql::Connection> available=2 used=1 size=8>}>
[2148303280] TXN close_connection(2157337300) (current = 4)
[2148303280] DO close_connection(2157337300) (current = 2157337300)
ERROR: #<NoMethodError: undefined method `close' for nil:NilClass> (/Users/knowtheory/code/dm/dm-do-adapter/lib/dm-do-adapter/adapter.rb:170:in `read'/Users/knowtheory/code/dm/dm-do-adapter/lib/dm-do-adapter/adapter.rb:289:in `with_connection'/Users/knowtheory/code/dm/dm-do-adapter/lib/dm-do-adapter/adapter.rb:141:in `read'/Users/knowtheory/code/dm/dm-core/lib/dm-core/repository.rb:162:in `read'/Users/knowtheory/code/dm/dm-core/lib/dm-core/model.rb:370:in `first'trans_test2.rb:74)
caelesta:dm knowtheory$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment