-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More comments in the signalling code #229
Conversation
75b196f
to
bf0f446
Compare
77f1b5c
to
0afe9dd
Compare
0afe9dd
to
9a547f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good and will definitely help in the future if someone else starts looking in here. I can publish a new release after the metric change is merged in. Nice work!
[minor] could you add your name to your comments to follow Eric's convention? I know people can use git blame but sometimes these are harder to follow.
|
rpc/wrtc_call_queue_mongodb.go
Outdated
@@ -422,14 +424,13 @@ func (queue *mongoDBWebRTCCallQueue) changeStreamManager() { | |||
} | |||
}() | |||
var lastSeq uint64 | |||
var ranOnce bool | |||
var ranOnce bool // this is only for the first time the changestream is setup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[minor] would it be worth renaming to initialized
? or something else that documents that it only happens once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to isInitialized
@@ -597,15 +602,21 @@ func (queue *mongoDBWebRTCCallQueue) processNextSubscriptionEvent(next mongoutil | |||
if _, ok := queue.csTrackingHosts[callResp.Host]; !ok { | |||
// no one connected to this operator is currently subscribed to insert | |||
// events for this host; skip | |||
// we do this because each server is listening to an event and each host only lives on one server | |||
// it could be on another server | |||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be worth adding a debug
log here or would it be so insanely noisy that it's not useful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it would be quite noisy and not useful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
rpc/wrtc_call_queue_mongodb.go
Outdated
@@ -614,10 +625,12 @@ func (queue *mongoDBWebRTCCallQueue) processNextSubscriptionEvent(next mongoutil | |||
// though, we want to send the events as fast as possible as mentioned | |||
// above and cannot block on the send to see if the receiver locked | |||
// the document. | |||
queue.logger.Infow("sending event", "event", event) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[q] wouldn't this log once per channel without including identifying information for the channel? Would it make sense to instead log the event in the log line above at line 619?
(Apologies if I'm misunderstanding here!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually just think we should remove this here, it will be noisy and it was mainly for me debugging locally :)
9a547f7
to
04d3883
Compare
.vscode/launch.json
Outdated
@@ -0,0 +1,15 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(maybe committed by accident?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Wasn't sure exactly how you decided which comments to prefix with note(roxy)
but it's a detail to add that; happy to defer to your decision tree. Thank you SO MUCH for marking this up and working to improve our signaling knowledge.
309fe0a
to
16a1ca9
Compare
1cbc8d8
to
33cd80d
Compare
No description provided.