Skip to content
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

Speed up cold start #753

Merged
merged 4 commits into from
Dec 16, 2022
Merged

Speed up cold start #753

merged 4 commits into from
Dec 16, 2022

Commits on Dec 9, 2022

  1. Speed up cold start

    If historical data is enough, a single stream detector takes 1 interval for cold start to be triggered + 1 interval for the state document to be updated. Similar to single stream detectors, HCAD cold start needs 2 intervals and one more interval to make sure an entity appears more than once. So HCAD needs three intervals to complete cold starts. Long initialization is the single most complained problem of AD. This PR reduces both single stream and HCAD detectors' initialization time to 1 minute by
    * delaying real time cache update by one minute when we receive ResourceNotFoundException in single stream detectors or when the init progress of HCAD real time cache is 0. Thus, we can finish the cold start and writing checkpoint one minute later and update the state document accordingly. This optimization saves one interval to wait for the state document update.
    * disable the door keeper by default so that we won't have to wait an extra interval in HCAD.
    * trigger cold start when starting a real time detector. This optimization saves one interval to wait for the cold start to be triggered.
    
    Testing done:
    * verified the cold start time is reduced to 1 minute.
    * added tests for new code.
    
    Signed-off-by: Kaituo Li <[email protected]>
    kaituo committed Dec 9, 2022
    Configuration menu
    Copy the full SHA
    a5313db View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2022

  1. address comments

    1. add comments
    
    Signed-off-by: Kaituo Li <[email protected]>
    kaituo committed Dec 13, 2022
    Configuration menu
    Copy the full SHA
    9753663 View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2022

  1. add comment and improve logging

    Signed-off-by: Kaituo Li <[email protected]>
    kaituo committed Dec 16, 2022
    Configuration menu
    Copy the full SHA
    2f23de0 View commit details
    Browse the repository at this point in the history
  2. Addressing 'org.apache.hc.core5.http.ParseException: Invalid protocol…

    … version' under JDK 16+
    
    Signed-off-by: Kaituo Li <[email protected]>
    kaituo committed Dec 16, 2022
    Configuration menu
    Copy the full SHA
    cf17ec7 View commit details
    Browse the repository at this point in the history