MongoDB
 sql >> Teknologi Basis Data >  >> NoSQL >> MongoDB

Apa perilaku pengaturan batas waktu dalam eksekusi pipa agregasi di Driver Java MongoDB?

Oke, saya mengerti. Jika eksekusi pipa agregasi melebihi waktu yang dinyatakan melalui metode maxTime a com.mongodb.MongoExecutionTimeoutException dilempar.

Stacktrace pengecualian persis sebagai berikut:

com.mongodb.MongoExecutionTimeoutException: operation exceeded time limit

    at com.mongodb.connection.ProtocolHelper.createSpecialException(ProtocolHelper.java:157)
    at com.mongodb.connection.ProtocolHelper.getCommandFailureException(ProtocolHelper.java:111)
    at com.mongodb.connection.CommandProtocol.execute(CommandProtocol.java:114)
    at com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:159)
    at com.mongodb.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:286)
    at com.mongodb.connection.DefaultServerConnection.command(DefaultServerConnection.java:173)
    at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:215)
    at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:206)
    at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:112)
    at com.mongodb.operation.AggregateOperation$1.call(AggregateOperation.java:227)
    at com.mongodb.operation.AggregateOperation$1.call(AggregateOperation.java:223)
    at com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:239)
    at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:212)
    at com.mongodb.operation.AggregateOperation.execute(AggregateOperation.java:223)
    at com.mongodb.operation.AggregateOperation.execute(AggregateOperation.java:65)
    at com.mongodb.Mongo.execute(Mongo.java:772)
    at com.mongodb.Mongo$2.execute(Mongo.java:759)

Semoga membantu.




  1. Redis
  2.   
  3. MongoDB
  4.   
  5. Memcached
  6.   
  7. HBase
  8.   
  9. CouchDB
  1. Bagaimana saya bisa mempertahankan nilai panjang nol selama fase $unwind dari pipa agregat di Mongo?

  2. Temukan satu atau buat dengan Mongoose

  3. Bagaimana cara menggunakan variabel sebagai nama bidang di mongodb-native findAndModify?

  4. bagaimana cara menggunakan grup di pymongo untuk mengelompokkan baris yang serupa?

  5. Tidak dapat memulai set replika MongoDB:berbagai kesalahan