[SERVER-54825] Use 'toArray()' in addition to array access after 'find()' in rslib.js Created: 26/Feb/21 Updated: 29/Oct/23 Resolved: 02/Mar/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0, 4.4.10 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Hana Pearlman | Assignee: | Hartek Sabharwal |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | greenerbuild | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v4.4
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 21 | ||||||||||||||||
| Description |
|
If we use coll.find().toArray()[0] instead of just coll.find()[0] then we will be able to catch the CappedPositionLost error as expected in getFirstOplogEntry(). (This doesn't solve the direct cause of the bug in the linked ticket, but it will avoid the bug in the future.) |
| Comments |
| Comment by Githook User [ 23/Sep/21 ] |
|
Author: {'name': 'Hartek Sabharwal', 'email': 'hartek.sabharwal@mongodb.com', 'username': 'tectonic8'}Message: |
| Comment by Githook User [ 02/Mar/21 ] |
|
Author: {'name': 'Hartek Sabharwal', 'email': 'hartek.sabharwal@mongodb.com', 'username': 'tectonic8'}Message: |