Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
add pruning vs archive node sharding #42
add pruning vs archive node sharding #42
Changes from 23 commits
a4adc29
dfec589
18bb1b6
6dc0a18
713e002
92e220b
c29ecc3
57073a2
83d943b
8da4717
1fca4cd
b7bb748
59211cb
4e94796
ad15c80
20104e5
b5a799f
36799d7
8c37c10
a325227
00c6855
e727f39
471eebc
47cd40e
509f383
f6e8757
7397383
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
prefer pointer to string to allow for differentiating between "value is empty because it was unset / nil, vs the empty value is what was set"
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.
the database has a default value of "DEFAULT" for the column.
realizing this doesn't work for requests that fail (ie. if they get 502'd because they aren't in the map). will update column to allow null and make this a pointer.
i think i'll also abandon backfilling the column to "DEFAULT" unless you think that's still worthwhile?
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.
digging deeper, it looks like we aren't creating metrics for failing requests.
the only case in which the
response_backend
wouldn't be correct if it defaulted to "DEAFULT" is in the case where the host is not in the host -> backend url map. in that case we short-circuit respond 502:kava-proxy-service/service/middleware.go
Lines 172 to 180 in ad18471
when we
return
there, we forego adding details to the context. this means for all the context values, casting to string will fail (ok == false
). then we return early, skipping metric creation.some examples:
kava-proxy-service/service/middleware.go
Lines 331 to 356 in ad18471
all those values are set after the failing request would short-circuit the middleware with the 502.
so the take away: