Server 4.0 throws Invalid field name: "clusterTime" in change stream

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 4.0.0
    • Component/s: None
    • None
    • ALL
    • Hide

      using change stream, do:

      var filter = "{ $and: [

      { operationType: 'update' }

      , " +
      "{ 'fullDocument._id' : '" + id+ "'}" +
      "{ 'updateDescription.updatedFields." + aField+ "':

      { $exists: true }

      } ] }";

      var pipeline = new EmptyPipelineDefinition<ChangeStreamDocument<BsonDocument>>().Match(filter);

      var changeStream = collectionDoc.Watch(pipeline, options).ToEnumerable().GetEnumerator();

      while (changeStream.MoveNext() && !cancellationToken.IsCancellationRequested)

      {      var change = changeStream.Current;      var updatedFields = change.UpdateDescription.UpdatedFields;      var changeUserID = BsonSerializer.Deserialize<User>(change.FullDocument).ID; }
      Show
      using change stream, do: var filter = "{ $and: [ { operationType: 'update' } , " + "{ 'fullDocument._id' : '" + id+ "'}" + "{ 'updateDescription.updatedFields." + aField+ "': { $exists: true } } ] }"; var pipeline = new EmptyPipelineDefinition<ChangeStreamDocument<BsonDocument>>().Match(filter); var changeStream = collectionDoc.Watch(pipeline, options).ToEnumerable().GetEnumerator(); while (changeStream.MoveNext() && !cancellationToken.IsCancellationRequested) {      var change = changeStream.Current;      var updatedFields = change.UpdateDescription.UpdatedFields;      var changeUserID = BsonSerializer.Deserialize<User>(change.FullDocument).ID; }
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When running local server MongoDB 4.0, Change stream's MoveNext()
      throws System.FormatException: Invalid field name: "clusterTime".  Downloaded previous version 3.6.6 and it works fine so it seems like this is a 4.0 issue only.

      This is being done using C# driver: 2.5.1

            Assignee:
            Nick Brewer (Inactive)
            Reporter:
            Ryan Joseph
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: