-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fix/dual legs transcribe race condition #593
Conversation
@@ -263,7 +264,8 @@ class TaskTranscribe extends SttTask { | |||
throw new Error(`Invalid vendor ${this.vendor}`); | |||
} | |||
} | |||
|
|||
// save dedicated bugname for each endpoint | |||
ep.transcribe_bugname = `${bugname}_${Date.now()}`; |
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.
can we use a simple integer counter rather than Date.now() ? It might be easier to debug if necessary
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.
No We can't, due to issue that new transcribe verb can have the same name again to the old transcribe verb is being killed
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'm confused though...seems like did make this change below?
lib/tasks/transcribe.js
Outdated
@@ -265,7 +266,8 @@ class TaskTranscribe extends SttTask { | |||
} | |||
} | |||
// save dedicated bugname for each endpoint | |||
ep.transcribe_bugname = `${bugname}_${Date.now()}`; | |||
ep.transcribe_bugname = `${bugname}_${channel}_${this.bugname_counter}`; |
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 just
ep.transcribe_bugname = `${bugname}_${channel}_${this.bugname_counter++}`;
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.
No, we can't use this,
first verb will have transcribe_bugname_1_0
LCC to move the call to new transcribe verb in listen will have same bug name again transcribe_bugname_1_0
in the meanwhile the first transcribe is still being closed, the 2nd transcribe save private data to same bug name again
Still Date.now() is a must to make sure every single time we have different bugname
This reverts commit 9d70ed9.
No description provided.