Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

db: rename kv Query to Request #2768

Merged
merged 1 commit into from
Mar 7, 2025
Merged

db: rename kv Query to Request #2768

merged 1 commit into from
Mar 7, 2025

Conversation

battlmonstr
Copy link
Contributor

No description provided.

@battlmonstr battlmonstr requested a review from canepat March 4, 2025 09:02
@battlmonstr battlmonstr force-pushed the pr/hist_as_of branch 3 times, most recently from 184a1f0 to a9bd934 Compare March 6, 2025 09:15
Base automatically changed from pr/hist_as_of to master March 6, 2025 09:29
@battlmonstr battlmonstr marked this pull request as ready for review March 6, 2025 09:48
@battlmonstr battlmonstr enabled auto-merge (squash) March 6, 2025 09:48
Copy link
Member

@JacekGlen JacekGlen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks good.

I just have one thought: can we apply similar logic to silkworm::datastore::kvdb:: and silkworm::db::state::?

Or maybe use a different approach and apply the following naming convention:

  • DomainGetLatestQuery -> DomainGetLatestQuery
  • DomainPutQuery -> DomainPutCommand
  • DomainDeleteQuery -> DomainDeleteCommand

I know it's a minor thing but things like DomainPutQuery might be confusing

@@ -1050,14 +1050,14 @@ int kv_get_latest() {
const auto verbose{absl::GetFlag(FLAGS_verbose)};

if (timestamp > -1) {
GetAsOfQuery query{
GetAsOfRequest query{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
GetAsOfRequest query{
GetAsOfRequest request{

.table = table_name,
.key = *key_bytes,
.timestamp = timestamp,
};
return execute_temporal_kv_query(target, kv_get_as_of_query, std::move(query), verbose);
}
GetLatestQuery query{
GetLatestRequest query{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
GetLatestRequest query{
GetLatestRequest request{

@battlmonstr battlmonstr merged commit 68440dd into master Mar 7, 2025
6 checks passed
@battlmonstr battlmonstr deleted the pr/refac branch March 7, 2025 13:55
@battlmonstr
Copy link
Contributor Author

@JacekGlen thanks for the review, let's discuss it further live. I'll address the found leftovers in a follow up PR.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants