Skip to content

Conversation

@BorisDog
Copy link
Contributor

@BorisDog BorisDog commented Jun 1, 2023

No description provided.

@BorisDog BorisDog requested a review from JamesKovacs June 1, 2023 22:41
Copy link
Contributor

@JamesKovacs JamesKovacs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback and questions for your consideration.

_rapidHeartbeatTimer.Change(TimeSpan.Zero, _minHeartbeatInterval);
}

_serverSelectionEventLogger.LogAndPublish(new ClusterEnteredSelectionQueueEvent(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to ask about allocating an object even if logging isn't enabled, but I see all the events are structs and thus won't incur heap allocation overhead. Very clever!

_description,
selector,
-1,
EventContext.OperationName));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we return an operationId of null for SelectServer but -1 for SelectServerAsync?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

_server.Description,
TimeSpan.FromSeconds(1),
-1,
EventContext.OperationName));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above. Why -1 for async but null for sync?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, should be null.

e.ClusterDescription.ToString(),
"Server selection failed",
"exception123"));
//e.Exception?.ToString()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug code exception123 should be replaced with commented impl on line 91.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, tnx.


// private methods
private IDisposable BeginOperation() => EventContext.BeginOperation(null, "listDatabases");

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing calls to BeginOperation in Execute and ExecuteAsync.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above comment needs addressing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, BeginOperation removed.

break;

case "tags":
case "tagSets":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks unrelated. Move to another ticket?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new tests add this tag. Example.

@BorisDog BorisDog requested a review from JamesKovacs June 13, 2023 01:39
Copy link
Contributor

@JamesKovacs JamesKovacs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment was missed.


// private methods
private IDisposable BeginOperation() => EventContext.BeginOperation(null, "listDatabases");

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above comment needs addressing.

@BorisDog BorisDog requested a review from JamesKovacs June 15, 2023 00:59
@BorisDog BorisDog merged commit 32f1d30 into mongodb:master Jun 15, 2023
@BorisDog BorisDog deleted the csharp4347 branch June 15, 2023 15:18
dnickless pushed a commit to dnickless/mongo-csharp-driver that referenced this pull request Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants