Skip to content

Instantly share code, notes, and snippets.

@scalabl3
Last active December 15, 2015 07:29
Show Gist options
  • Save scalabl3/5223293 to your computer and use it in GitHub Desktop.
Save scalabl3/5223293 to your computer and use it in GitHub Desktop.
test bucket only passivating once?

cbgb output

2013/03/22 09:54:56 cbgb - 0.2.0-6-g4f2787a
2013/03/22 09:54:56   addr=:11211
2013/03/22 09:54:56   data=./tmp
2013/03/22 09:54:56   default-bucket-name=default
2013/03/22 09:54:56   default-persistence=2
2013/03/22 09:54:56   default-quota=100MB
2013/03/22 09:54:56   num-partitions=1
2013/03/22 09:54:56   rest-couch=:8092
2013/03/22 09:54:56   rest-ns=:8091
2013/03/22 09:54:56   static-path=http://cbfs-ext.hq.couchbase.com/cbgb/static.zip
2013/03/22 09:54:56   v=true
2013/03/22 09:54:56   []
2013/03/22 09:54:56 loading buckets from: ./tmp
2013/03/22 09:54:56 loading bucket: default
2013/03/22 09:54:56 loading bucket: test
2013/03/22 09:54:56 listening data on: :11211
2013/03/22 09:54:56 listening rest-couch on: :8092
2013/03/22 09:54:56 Loading static content from http://cbfs-ext.hq.couchbase.com/cbgb/static.zip
2013/03/22 09:54:57 listening rest-ns on: :8091
2013/03/22 09:59:56 Passivating bucket default
2013/03/22 09:59:56 Scan complete, cleaned up 0 items with <nil>, 9 remaining
2013/03/22 10:04:56 Scan complete, cleaned up 0 items with <nil>, 10 remaining
2013/03/22 10:09:56 Passivating bucket test
2013/03/22 10:09:59 loading bucket: test
2013/03/22 10:12:02 loading bucket: default
2013/03/22 10:13:29 http: multiple response.WriteHeader calls
2013/03/22 10:13:29 Error sending streaming result: write tcp 127.0.0.1:59815: broken pipe
2013/03/22 10:14:56 Passivating bucket default
2013/03/22 10:14:56 Scan complete, cleaned up 0 items with <nil>, 8 remaining
2013/03/22 10:19:56 Scan complete, cleaned up 0 items with <nil>, 9 remaining
2013/03/22 10:24:56 Scan complete, cleaned up 0 items with <nil>, 10 remaining
2013/03/22 10:29:56 Scan complete, cleaned up 0 items with <nil>, 11 remaining
2013/03/22 10:34:56 Passivating bucket test
2013/03/22 10:34:56 Scan complete, cleaned up 0 items with <nil>, 11 remaining
2013/03/22 10:35:02 loading bucket: test
2013/03/22 10:39:56 Passivating bucket test
2013/03/22 10:40:02 loading bucket: test

ruby output

#<Couchbase::Bucket:0x007fcb1411d780 "http://localhost:8091/pools/default/buckets/test/" default_format=:document, default_flags=0x0, quiet=false, connected=true, timeout=2500000>
2013-03-22 09:54:59.109 INCR curr = 1, counter = 1; connected = true, sleeping for 1s
2013-03-22 09:55:00.109 wake
2013-03-22 09:55:00.109 INCR curr = 2, counter = 2; connected = true, sleeping for 2s
2013-03-22 09:55:02.110 wake
2013-03-22 09:55:02.111 INCR curr = 3, counter = 3; connected = true, sleeping for 4s
2013-03-22 09:55:06.111 wake
2013-03-22 09:55:06.111 INCR curr = 4, counter = 4; connected = true, sleeping for 8s
2013-03-22 09:55:14.112 wake
2013-03-22 09:55:14.112 INCR curr = 5, counter = 5; connected = true, sleeping for 16s
2013-03-22 09:55:30.113 wake
2013-03-22 09:55:30.114 INCR curr = 6, counter = 6; connected = true, sleeping for 32s
2013-03-22 09:56:02.114 wake
2013-03-22 09:56:02.114 INCR curr = 7, counter = 7; connected = true, sleeping for 64s
2013-03-22 09:57:06.114 wake
2013-03-22 09:57:06.115 INCR curr = 8, counter = 8; connected = true, sleeping for 128s
2013-03-22 09:59:14.115 wake
2013-03-22 09:59:14.115 INCR curr = 9, counter = 9; connected = true, sleeping for 256s
2013-03-22 10:03:30.116 wake
2013-03-22 10:03:30.117 INCR curr = 10, counter = 10; connected = true, sleeping for 512s
2013-03-22 10:12:02.118 wake
FAIL: Couchbase::Error::Network - failed to perform arithmetic operation (key="counter", error=0x10)
rbtest.rb:14:in `incr'
rbtest.rb:14:in `run_test'
rbtest.rb:26:in `block in <main>'
rbtest.rb:24:in `loop'
rbtest.rb:24:in `<main>'
2013-03-22 10:12:02.119 CBGB Disconnected due to Passivation, Reconnect and Resume
#<Couchbase::Bucket:0x007fcb1411d780 "http://localhost:8091/pools/default/buckets/test/" default_format=:document, default_flags=0x0, quiet=false, connected=true, timeout=2500000>
2013-03-22 10:12:02.123 INCR curr = 1, counter = 1; connected = true, sleeping for 1s
2013-03-22 10:12:03.124 wake
2013-03-22 10:12:03.124 INCR curr = 2, counter = 2; connected = true, sleeping for 2s
2013-03-22 10:12:05.124 wake
2013-03-22 10:12:05.125 INCR curr = 3, counter = 3; connected = true, sleeping for 4s
2013-03-22 10:12:09.126 wake
2013-03-22 10:12:09.126 INCR curr = 4, counter = 4; connected = true, sleeping for 8s
2013-03-22 10:12:17.127 wake
2013-03-22 10:12:17.127 INCR curr = 5, counter = 5; connected = true, sleeping for 16s
2013-03-22 10:12:33.128 wake
2013-03-22 10:12:33.128 INCR curr = 6, counter = 6; connected = true, sleeping for 32s
2013-03-22 10:13:05.128 wake
2013-03-22 10:13:05.129 INCR curr = 7, counter = 7; connected = true, sleeping for 64s
2013-03-22 10:14:09.129 wake
2013-03-22 10:14:09.129 INCR curr = 8, counter = 8; connected = true, sleeping for 128s
2013-03-22 10:16:17.129 wake
2013-03-22 10:16:17.130 INCR curr = 9, counter = 9; connected = true, sleeping for 256s
2013-03-22 10:20:33.131 wake
2013-03-22 10:20:33.131 INCR curr = 10, counter = 10; connected = true, sleeping for 512s
2013-03-22 10:29:05.132 wake
2013-03-22 10:29:05.133 INCR curr = 11, counter = 11; connected = true, sleeping for 1024s
2013-03-22 10:46:09.134 wake
FAIL: Couchbase::Error::Network - failed to perform arithmetic operation (key="counter", error=0x10)
rbtest.rb:14:in `incr'
rbtest.rb:14:in `run_test'
rbtest.rb:26:in `block in <main>'
rbtest.rb:24:in `loop'
rbtest.rb:24:in `<main>'
2013-03-22 10:46:09.135 CBGB Disconnected due to Passivation, Reconnect and Resume
#<Couchbase::Bucket:0x007fcb1411d780 "http://localhost:8091/pools/default/buckets/test/" default_format=:document, default_flags=0x0, quiet=false, connected=true, timeout=2500000>
2013-03-22 10:46:09.139 INCR curr = 1, counter = 1; connected = true, sleeping for 1s
2013-03-22 10:46:10.140 wake
2013-03-22 10:46:10.140 INCR curr = 2, counter = 2; connected = true, sleeping for 2s
2013-03-22 10:46:12.141 wake
2013-03-22 10:46:12.142 INCR curr = 3, counter = 3; connected = true, sleeping for 4s

That second round should have had a passivated bucket but didn't passivate when I expected it to

There was a long wait, where in the first round it had passivated after the 512s sleep mark, this time it was after that time. I can change my sleep timer to be more granular to find the timing more exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment