[JAVA-341] On INSERT iterate over documents ONCE not TWICE Created: 30/Apr/11 Updated: 31/Mar/15 Resolved: 12/Jul/13 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Performance |
| Affects Version/s: | 2.5.3 |
| Fix Version/s: | 3.0.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Anatoly Polinsky | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 2 |
| Labels: | concurrency, insert | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
N/A |
||
| Attachments: |
|
| Description |
|
Currently DBApiLayer iterates through documents TWICE in case '_id's have to be created ( "shouldApply" is true ): once to set "_id"s and the second time to create batch chunks. Attaching a patch that optimizes the INSERT: now documents are iterated only ONCE without changing a current behavior. /Anatoly P.S. I am currently testing with application level partitioning, so different partitions actually sent to the different mongoDs in real time ( even distribution ): https://github.com/anatoly-polinsky/mongodb-write-performance-playground and the patch does help to boost the performance. |
| Comments |
| Comment by Jeffrey Yemin [ 31/Mar/15 ] |
|
Closing all resolved 3.0.0 issues, as 3.0.0 has been tagged and released. |
| Comment by Jeffrey Yemin [ 12/Jul/13 ] |
|
Fixed in 3.0.x branch: https://github.com/mongodb/mongo-java-driver/commit/fac7ede#L18R45 |