[JAVA-1252] Should invalidate connection pool when ServerMonitor detects a disconnect Created: 21/May/14 Updated: 30/Jan/15 Resolved: 24/Jun/14 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Cluster Management, Connection Management |
| Affects Version/s: | 2.12.2 |
| Fix Version/s: | 2.12.3, 3.0.0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | David CHAU | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Description |
|
When restarting mongodb, the first request after mongodb has restarted fails.
The DefaultServer$DefaultServerStateListener class should call connectionProvider.invalidate(); if the state changed from connected to connecting |
| Comments |
| Comment by Githook User [ 30/Jan/15 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by Githook User [ 01/Aug/14 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by Githook User [ 24/Jun/14 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by Jeffrey Yemin [ 20/Jun/14 ] |
|
Pushed to 2.12.x, still need to port to 3.0.x. |
| Comment by Githook User [ 16/Jun/14 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by David CHAU [ 21/May/14 ] |
|
In jdbc drivers there is usually a "testOnBorrow" flag. |
| Comment by Jeffrey Yemin [ 21/May/14 ] |
|
Thanks for sharing the use case. I definitely see where you are coming from. |
| Comment by David CHAU [ 21/May/14 ] |
|
Not necessary. We had a maintenance in order to upgrade mongo server from 2.4. to 2.6. That took more than 5s. During this period, we managed to prevent any mongo operation on our systems. |
| Comment by Jeffrey Yemin [ 21/May/14 ] |
|
Understood. My point is that the default heartbeat frequency is 5 seconds, and a typical application will execute operations much more frequently than that. |
| Comment by David CHAU [ 21/May/14 ] |
|
This is actually to prevent the first operation to fail |
| Comment by Jeffrey Yemin [ 21/May/14 ] |
|
I'm marking this as a minor improvement because with a more realistic heartbeat frequency, it's more likely that the problem will be first detected via a failed operation than via the monitor. |