richardwilly98 / elasticsearch-river-mongodb

MongoDB River Plugin for ElasticSearch
1.12k stars 215 forks source link

Fix old mongo with new driver compatibility #504

Closed smecsia closed 9 years ago

smecsia commented 9 years ago

I've tested the latest river version with the different Mongo versions (at least with 2.6 and 3.0) and different mongo driver versions. Sometimes cursor.disableBatchSizeTracking throws the NoSuchMethodError. This is actually the only thing that works differently. If we ignore the error, indexing works as expected. So, may be, just ignore it?

benmccann commented 9 years ago

@smecsia can you expand on which versions it does or doesn't work on?

richardwilly98 commented 9 years ago

Apparently tag for releases 3.0.0-rc1 and 2.13.0

https://github.com/mongodb/mongo-java-driver/commit/c1e298005c0319a92d2e61ec874ae1c2ee8a73c7

smecsia commented 9 years ago

I've retested with different versions and got the following results:

MongoDB version Mongo java driver version ES river version NoSuchMethodError
2.6.8 2.12.5 2.0.5 -
2.6.8 2.13.0 2.0.7 -
2.6.8 3.0.0-rc1 2.0.7 +
3.0.1 2.13.0 2.0.7 -
3.0.1 3.0.0-rc1 2.0.7 +

Thus, it's happening just for the new mongo driver version (3.0.0-rc1). Though if we ignore this error, river works fine with the rc1 version of the driver. So, this line should be removed for the upcoming releases only.

benmccann commented 9 years ago

Yeah, it won't even compile with 3.0.0-rc1. But there's no reason to upgrade the driver used by the river, is there? I don't know if I see a need for this at the moment.

smecsia commented 9 years ago

No reason at the moment, I agree. You can close the PR if you want.

benmccann commented 9 years ago

I'll close for now