[SERVER-8285] DB accessors intercepting prototype access to 'this' Created: 22/Jan/13 Updated: 11/Jul/16 Resolved: 12/Feb/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 2.3.2 |
| Fix Version/s: | 2.4.0-rc1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Asya Kamsky | Assignee: | Ben Becker |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
This is not 100% of the time but simple reproducer is
|
| Comments |
| Comment by auto [ 12/Feb/13 ] |
|
Author: {u'date': u'2013-02-12T19:17:39Z', u'name': u'Ben Becker', u'email': u'ben.becker@10gen.com'}Message: |
| Comment by Ben Becker [ 01/Feb/13 ] |
|
I think this also has the potential to interfere with GLE, at least when called from this.getLastErrorCmd(1) in db.js. For now, I think the best approach is to simply disambiguate variables in the object instance scope so they are not caught by our 'collectionGetter' interceptor. |
| Comment by Ben Becker [ 23/Jan/13 ] |
|
One manifestation of this bug is that verbose mode displays execution times as "NaNms". Apparently our interceptor for 'DB' (collectionGetter) is catching JS calls from the prototype for 'this.startTime', and translating to '<dbname>.startTime'. |