Juju writes to mongo without an actual change occurring
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
High
|
Andrew Wilkins | ||
1.20 |
Fix Released
|
High
|
Andrew Wilkins |
Bug Description
This issue was first mentioned in bug 1344940.
Juju is constantly writing to Mongo been though there's been no change which would warrant a database update being required. Hence the writes are no-ops but cause I/O starvation and fill txn logs etc.
<snip>
the problem is 1000s of writes without an actual change, ie. the transaction log is full of these
stateServer
u'addresstype': u'ipv4', u'port': 17070, u'value': u'192.168.9.74'}, {u'networkscope': u'local-machine', u'addresstype': u'ipv4', u'port': 17070, u'value': u'127.0.0.1'}, {u'networkscope': u'local-machine', u'ad\
dresstype': u'ipv6', u'port': 17070, u'value': u'::1'}, {u'addresstype': u'ipv6', u'port': 17070, u'value': u'fe80:
2014/07/19-15:41:13 applied
stateServer
u'addresstype': u'ipv4', u'port': 17070, u'value': u'192.168.9.74'}, {u'networkscope': u'local-machine', u'addresstype': u'ipv4', u'port': 17070, u'value': u'127.0.0.1'}, {u'networkscope': u'local-machine', u'ad\
dresstype': u'ipv6', u'port': 17070, u'value': u'::1'}, {u'addresstype': u'ipv6', u'port': 17070, u'value': u'fe80:
we should not be writing to the database when there is no actual change.
here's a pretty print of the last 100 txns in the transaction collection.
http://
<snip>
Changed in juju-core: | |
status: | Triaged → In Progress |
assignee: | nobody → Andrew Wilkins (axwalk) |
tags: | added: cloud-installer landscape |
Changed in juju-core: | |
milestone: | 1.20.2 → 1.21-alpha1 |
status: | In Progress → Fix Committed |
Changed in juju-core: | |
status: | In Progress → Fix Committed |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
The change I made doesn't actually fix the issue, because the readonly assertion that I added to prevent races also spams the oplog. There's only one caller at the moment, which I'm pretty sure I can modify to elide no-op calls.