-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.5
-
Component/s: Connectivity, Read Operations
-
None
-
(copied to CRM)
I got following exception when tried to resume watching changes in collection with new change stream feature in MongoDB 3.6.
This error happened on 2 out of 6 collections I watched. It started occurring after 6-12 hours and it worked normally before. To resolve it I needed to restart watching for the events without resume token which is unfortunate because it can cause loss of information in my system.
System.IO.EndOfStreamException: Attempted to read past the end of the stream.
at void MongoDB.Bson.IO.BsonStreamExtensions.ReadBytes(BsonStream stream, byte[] buffer, int offset, int count)
at int MongoDB.Bson.IO.BsonStreamAdapter.ReadInt32()
at int MongoDB.Bson.IO.BsonBinaryReader.ReadSize()
at void MongoDB.Bson.IO.BsonBinaryReader.ReadStartDocument()
at BsonDocument MongoDB.Bson.Serialization.Serializers.BsonDocumentSerializer.DeserializeValue(BsonDeserializationContext context, BsonDeserializationArgs args)
at TBsonValue MongoDB.Bson.Serialization.Serializers.BsonValueSerializerBase<TBsonValue>.Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)
at TValue MongoDB.Bson.Serialization.IBsonSerializerExtensions.Deserialize<TValue>(IBsonSerializer<TValue> serializer, BsonDeserializationContext context)
at BsonValue MongoDB.Bson.Serialization.Serializers.BsonValueSerializer.DeserializeValue(BsonDeserializationContext context, BsonDeserializationArgs args)
at TBsonValue MongoDB.Bson.Serialization.Serializers.BsonValueSerializerBase<TBsonValue>.Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)
at TValue MongoDB.Bson.Serialization.IBsonSerializerExtensions.Deserialize<TValue>(IBsonSerializer<TValue> serializer, BsonDeserializationContext context)
at BsonDocument MongoDB.Bson.Serialization.Serializers.BsonDocumentSerializer.DeserializeValue(BsonDeserializationContext context, BsonDeserializationArgs args)
at TBsonValue MongoDB.Bson.Serialization.Serializers.BsonValueSerializerBase<TBsonValue>.Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)
at TValue MongoDB.Bson.Serialization.IBsonSerializerExtensions.Deserialize<TValue>(IBsonSerializer<TValue> serializer, BsonDeserializationContext context)
at BsonValue MongoDB.Bson.Serialization.Serializers.BsonValueSerializer.DeserializeValue(BsonDeserializationContext context, BsonDeserializationArgs args)
at TBsonValue MongoDB.Bson.Serialization.Serializers.BsonValueSerializerBase<TBsonValue>.Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)
at TValue MongoDB.Bson.Serialization.IBsonSerializerExtensions.Deserialize<TValue>(IBsonSerializer<TValue> serializer, BsonDeserializationContext context)
at BsonDocument MongoDB.Bson.Serialization.Serializers.BsonDocumentSerializer.DeserializeValue(BsonDeserializationContext context, BsonDeserializationArgs args)
at TBsonValue MongoDB.Bson.Serialization.Serializers.BsonValueSerializerBase<TBsonValue>.Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)
at TValue MongoDB.Bson.Serialization.IBsonSerializerExtensions.Deserialize<TValue>(IBsonSerializer<TValue> serializer, BsonDeserializationContext context)
at ChangeStreamDocument<TDocument> MongoDB.Driver.ChangeStreamDocumentSerializer<TDocument>.DeserializeValue(BsonDeserializationContext context, BsonDeserializationArgs args)
at TValue MongoDB.Bson.Serialization.Serializers.SealedClassSerializerBase<TValue>.Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)
at TValue MongoDB.Bson.Serialization.IBsonSerializerExtensions.Deserialize<TValue>(IBsonSerializer<TValue> serializer, BsonDeserializationContext context)
at TDocument MongoDB.Driver.Core.Operations.ChangeStreamCursor<TDocument>.DeserializeDocument(RawBsonDocument rawDocument)
at IEnumerable<TDocument> MongoDB.Driver.Core.Operations.ChangeStreamCursor<TDocument>.DeserializeDocuments(IEnumerable<RawBsonDocument> rawDocuments)
at void MongoDB.Driver.Core.Operations.ChangeStreamCursor<TDocument>.ProcessBatch(bool hasMore)
at async Task<bool> MongoDB.Driver.Core.Operations.ChangeStreamCursor<TDocument>.MoveNextAsync(CancellationToken cancellationToken)
- backported by
-
CSHARP-1059 RunCommand replSetReconfig System.IO.EndOfStreamException: Attempted to read past the end of the stream.
- Closed
- is related to
-
SERVER-32496 Start tailing from the beginning of changes history
- Backlog