Inconsistent behavior with the UpdateAsync and UpdateOne methods in C# MongoDB.Driver

We are utilizing the C# MongoDB.Driver library, specifically the latest version (2.23.1). However, we are experiencing intermittent and inconsistent behavior with the UpdateAsync and UpdateOne methods. These methods fail to update
the collection randomly, and no error is provided. This issue occurs unpredictably, and the update operation does not consistently succeed, even though no explicit error is reported.
Following is the sample Code

Env. .net Core 6.0 , c# mongodb Driver is 2.23.1 for both (Bson, Mongodb Driver)

var filters = Builders<Users>.Filter.Eq("Id", ObjectId.Parse(userAvailability.User_Id));
var update = Builders<Users>.Update.Set("Available", objAvailable);
var collection = _users.DBCollection();
var result = await collection.UpdateOneAsync(filters, update);

Hi @Jason_Hill,

Welcome to the MongoDB Community forums :sparkles:

To assist you more effectively, could you please provide additional details? Here are some specific points that would be helpful:

  1. Any error messages or exceptions encountered during the intermittent failures.
  2. Server and driver version compatibility details (MongoDB server version and the specific version of the C# driver).
  3. Server logs related to the update operation from your MongoDB instance.
  4. A more extensive code snippet surrounding the UpdateOneAsync call.
  5. Any further information on the MongoDB server’s status and connectivity.

These details will help the community members better understand and troubleshoot the issue you’re facing. Feel free to share any other relevant information that might be useful.

Best regards,
Kushagra