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

ENG-55392-Googlestackdriver collector: Handle the throttle error for pagination scenario #368

Merged
merged 1 commit into from
May 30, 2024

Conversation

rakhimundhada15
Copy link
Contributor

Problem Description

During throttling, we increase the poll interval and decrease the time duration. However, when the collector is collecting data through pagination, it already sets the filter timestamp (timestamp >= since and timestamp < until). The actual until value changes in the state during throttling. Once pagination completes and the collector creates a new state, it starts again from the same timestamp, resulting in duplicate data collection.

ex. In below state example until value(i.e 2024-05-25T10:39:49.000Z) in filter and actual(i.e 2024-05-24T10:39:50.000Z) is different.
{"priv_collector_state":{"since":"2024-05-24T10:39:49.000Z","nextPage":{"filter":"timestamp >= \"2024-05-24T10:39:49.000Z\"\ntimestamp < \"2024-05-25T10:39:49.000Z\"","pageSize":1000,"resourceNames":["projects/prj-mstr-prod"],"pageToken":"EAA44cC8vNq0xP5RSq "},"stream":"projects/prj-mstr-prod","until":"2024-05-24T10:39:50.000Z","poll_interval_sec":420},"retry_count":0}

Solution Description

Now we just reduce the page size during pagination and not the until value.

@al-cibot
Copy link

CI Service Job Number 985 Logs - SUCCESS

alps ci job-logs --organization alertlogic --repository paws-collector --job-num 985 -g

Stages Run:

  • PR Test

@rakhimundhada15
Copy link
Contributor Author

build-collector-googlestackdriver

@al-cibot
Copy link

CI Service Job Number 986 Logs - SUCCESS

alps ci job-logs --organization alertlogic --repository paws-collector --job-num 986 -g

Stages Run:

  • build-collector-googlestackdriver
  • file_packager_36834a

@rakhimundhada15 rakhimundhada15 merged commit bfcf5d4 into alertlogic:master May 30, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants