Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
prev_bucket_sec holds the actual time at which the previous bucket was created and it is used to compute if the previous bucket time has elapsed and when is the time to create a new one. But since the bucket start time is rounded down to logical time window start, that makes the prev_bucket_sec and bucket start time out of sync with each other, and depending on the query arrival time there is a high probability that a bucket gets missed especially when the last bucket was created around the end of the bucket time window. Solution is to keep the prev_bucket_sec and bucket start time in-sync. Moreover, we are using the unint64 for storing the prev_bucket_sec which is kind of an overkill and a simple uint should be good enough for the purpose. But that change can be taken up as part of the create-bucket function refactoring task.
- Loading branch information