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

fix: InterpreterMetrics could subtract with overflow #17461

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

forsaken628
Copy link
Collaborator

@forsaken628 forsaken628 commented Feb 15, 2025

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

  11: core::panicking::panic_const::panic_const_sub_overflow
             at /rustc/6b6a867ae9eac4e78d041ac4ee84be1072a48cf7/library/core/src/panicking.rs:182:21
  12: databend_query::interpreters::interpreter_metrics::InterpreterMetrics::record_query_detail
             at /home/coldwater/Projects/github.com/databendlabs/databend/src/query/service/src/interpreters/interpreter_metrics.rs:52:33
  13: databend_query::interpreters::interpreter_metrics::InterpreterMetrics::record_query_finished
             at /home/coldwater/Projects/github.com/databendlabs/databend/src/query/service/src/interpreters/interpreter_metrics.rs:120:9

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@github-actions github-actions bot added the pr-bugfix this PR patches a bug in codebase label Feb 15, 2025
Copy link

what-the-diff bot commented Feb 15, 2025

PR Summary

  • Simplified Time Handling
    Removed a piece of code (std::time::UNIX_EPOCH) that was not necessary. This will make the code cleaner and easier to manage.
  • Updated Calculation Method
    The process of calculating query_duration_ms has been updated to use duration_since instead of a custom-made function. This can contribute to improved calculation precision and reliability.
  • Eliminated Redundant Function
    Quashed the convert_query_timestamp function as it is no longer needed. This helps in making our codebase leaner and more efficient.

@sundy-li sundy-li merged commit fd1b0c1 into databendlabs:main Feb 17, 2025
70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bugfix this PR patches a bug in codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants