-
Notifications
You must be signed in to change notification settings - Fork 844
TS-4295: Add Priority Queue in lib/ts/ #537
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
Conversation
|
This looks clean to me, but I haven't not checked for correctness. +1 from me. |
lib/ts/PriorityQueue.h
Outdated
| @@ -0,0 +1,191 @@ | |||
| /** @file | |||
|
|
|||
| Priority Queue Implimentation using Min Heap. | |||
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.
Implimentation -> Implementation
|
There should be a test case for decreasing weights. |
|
@maskit Please take another look. |
lib/ts/PriorityQueue.h
Outdated
| #ifndef __PRIORITY_QUEUE_H__ | ||
| #define __PRIORITY_QUEUE_H__ | ||
|
|
||
| #include "ts/Diags.h" |
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.
What does require Diags.h?
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.
Nothing. I'll remove this. ( Debug logs were somewhere but I removed them. )
|
Looks good except the comparator part. |
|
@maskit Comparator is added. |
|
Cool! +1 |
|
@masaori335 you can use |
|
@jpeach I agree with using many asserts is ugly. But if I understand correctly, when we use |
|
@jpeach I was wrong. I didn't know we can use
I'll fix tests to use it. |
apache#7913) (apache#537) This causes the VCONN_CLOSE hooks to be called more consistently in the event of TS_EVENT_VCONN_CLOSE. Without this patch it got missed under some circumstances, causing situations where plugins would receive a TS_EVENT_VCONN_START but never a TS_EVENT_VCONN_CLOSE for some connections. (cherry picked from commit a916044)
(cherry picked from commit 72e6602) Co-authored-by: Masaori Koshiba <masaori@apache.org>
* Revert "Gauge to Counter metrics for CDN Harmony (apache#544)" This reverts commit 1a83589. * Revert "[9.2.x] Improve performance of finding SNI Actions (apache#541)" This reverts commit 21cbfc0. * Revert "TSan: Make Thread::cur_time thread local (apache#9184) (apache#537)" This reverts commit d93ac0e. * Revert "Fix a crash in FetchSM (apache#546)" This reverts commit e03b829. * Revert "Remove dependency on OpenSSL's OCSP API (apache#538)" This reverts commit 00ad803. * Revert "Fix crashes on OCSP requests (apache#543)" This reverts commit bbb41b9. * Revert "Add OTHER to cipher TLS cipher metrics (apache#542)" This reverts commit 74dbd97. * Revert "rio: use bazinga-boringssl 19.x for boringssl build (apache#540)" This reverts commit 9c57330. * Revert "Use FetchSM for OCSP HTTP requests (apache#535)" This reverts commit dbd0ec7. * Do not schedule reconfigure event on schedule_imm_local Co-authored-by: Mo Chen <mochen@apache.org> Co-authored-by: Serris Lew <lserris@apple.com>
TS-4295