We are in process of upgrading java driver from version 2.14 to 3.4.2. The MongoDB server ver is at 3.2.19 and the goal is to upgrade server version to 3.4 once driver has been successfully upgraded. We are experiencing slowness to some calls on the new driver interacting with server version 3.2. Although I won't be able to link the app code, here's some comparison details between old and new driver. These are all findAll() queries.
|2.14 Driver||Query time|
|3.4.2 Driver||Query time|
We added more timing information around different calls and compared between the Old and new driver. Extracting some info here.
Looking at that data, we noticed:
1. For data.size() calls, old driver consistently takes ~1ms, and new driver takes from 8ms to 99ms
2. For data.hasNext() calls, seems like the first instance of hasNext() call with old driver takes from 1ms to 6ms, and new driver is taking from 5ms to 389ms. But the other hasNext() calls seems fine?
3. For data.next() calls, there's not much difference between old driver and new driver.
Looking for insight if you're aware of any bug in the new driver version that could possibly cause this behavior? Any help would be great for us to proceed with upgrading our mongoDB server versions across the board.