-
Notifications
You must be signed in to change notification settings - Fork 17
Refactor offloading watermark and add watermark in metrics collection job #1074
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
Refactor offloading watermark and add watermark in metrics collection job #1074
Conversation
…te related methods for improved clarity and consistency
b0f8ece
to
9ea9d5c
Compare
9ea9d5c
to
348a092
Compare
348a092
to
fe4ef00
Compare
} | ||
} | ||
|
||
// HELP: Not sure about raising the error here |
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.
Don't know how to deal with the error
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 think returning an error is correct. it would happen if the function was passed a global watermark instead of a decision rules one. Maybe we can clarify the error to reflect that.
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 will fix it in #1071 after rebase
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.
Just left a response to one of your question. Let's do that and merge into the other branch, so we can review it fully functional!
CreatedAt time.Time | ||
UpdatedAt time.Time | ||
Params *json.RawMessage |
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.
json.RawMessage
is a []byte
underneath, so it can already be nil
. I don't think we need the extra indirection here.
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.
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 will remove the pointer in #1071 after rebase.
Thanks
554b18b
into
mar-1129-define-the-collectdata-logic
This PR modifies the
offloading_watermark
table to be renamed towatermark
. This change allows us to move away from the specific offloading use case and makes the table more generic.Additionally, this PR introduces the concept of watermarking in the metric collection system to provide a reference for the lower bound on dates. The param attribute allows adding extra parameters based on the type of watermark if the existing fields are insufficient. I introduce the notion of watermark
type
I have ensured that the same fields as in the offloading table are retained, although some field names have been changed for clarity and consistency.
The migration process is done in two steps:
During the migration, the table is locked to prevent any access and ensure data integrity.
Additionally, this PR introduces the concept of watermarking in the metric collection system to provide a reference for the lower bound on dates.