Coder Social home page Coder Social logo

migrate-mongo-cluster's People

Contributors

sarjarapu avatar torstenspindler avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

migrate-mongo-cluster's Issues

When source is sharded cluster - read the last entry in the oplog fails as it is using mongos instead of reconnecting to each shard

I have tracked the code according to the sack trace in the error (hereunder) and it looks like the mongo driver has identified it is connected to a sharded cluster but this tools does not take it into account and tries to read the oplog from the connected server, which in a sharded cluster scenario is mongos - so it fails.

[ERROR] 2022-02-23 16:23:19 ERROR [main] MongoDBHelper:72 - [UNHANDLED] error while performing operation: {"operation": "find", "query": {}}; error: com.mongodb.MongoQueryException: Query failed with error code 20 and error message '' on server mymongos:27017 Exception in thread "main" com.mongodb.MongoQueryException: Query failed with error code 20 and error message '' on server mymongos:27017 at com.mongodb.operation.FindOperation$1.call(FindOperation.java:735) at com.mongodb.operation.FindOperation$1.call(FindOperation.java:725) at com.mongodb.operation.OperationHelper.withReadConnectionSource(OperationHelper.java:463) at com.mongodb.operation.FindOperation.execute(FindOperation.java:725) at com.mongodb.operation.FindOperation.execute(FindOperation.java:89) at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java:189) at com.mongodb.client.internal.FindIterableImpl.first(FindIterableImpl.java:205) at com.mongodb.migratecluster.trackers.ReadOnlyDataTracker.lambda$getLatestDocument$0(ReadOnlyDataTracker.java:40) at com.mongodb.migratecluster.helpers.MongoDBHelper.performOperationWithRetry(MongoDBHelper.java:46) at com.mongodb.migratecluster.trackers.ReadOnlyDataTracker.getLatestDocument(ReadOnlyDataTracker.java:38) at com.mongodb.migratecluster.migrators.OplogMigrator.getLatestOplogEntryFromSource(OplogMigrator.java:118) at com.mongodb.migratecluster.migrators.OplogMigrator.fetchRecentEntryFromSourceAndSaveToOplogstore(OplogMigrator.java:90) at com.mongodb.migratecluster.migrators.OplogMigrator.saveSourceOplogTimeOnOplogstoreIfNotExists(OplogMigrator.java:81) at com.mongodb.migratecluster.migrators.OplogMigrator.preprocess(OplogMigrator.java:50) at com.mongodb.migratecluster.migrators.DataWithOplogMigrator.preprocess(DataWithOplogMigrator.java:31) at com.mongodb.migratecluster.Application.run(Application.java:43) at com.mongodb.migratecluster.Application.main(Application.java:30)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.