Skip to content

Conversation

@SharonIV0x86
Copy link
Contributor

Part of #2889

void EventListener::OnTableFileDeleted(const rocksdb::TableFileDeletionInfo &info) {
LOG(INFO) << "[event_listener/table_file_deleted] db: " << info.db_name << ", sst file: " << info.file_path
<< ", status: " << info.status.ToString();
void EventListener::OnTableFileDeleted(const rocksdb::TableFileDeletionInfo &info_) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@PragmaTwice Hi, i had to rename the function parameter to info_ for some functions as it was conflicting with the spdlog's info.

@PragmaTwice PragmaTwice self-requested a review May 6, 2025 16:15
@SharonIV0x86
Copy link
Contributor Author

@PragmaTwice
The build and test for Darwin (Clang) is failing because there are no test files in the gocase/util folder. Since this folder just has utility code, maybe we could add a simple dummy test file to stop the CI from failing. Do you think that this would be a good idea?

@PragmaTwice PragmaTwice requested a review from Copilot May 7, 2025 03:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the logging calls in the storage module to use the new logging functions (info, warn, error, and debug) instead of the old LOG macros. The changes provide a consistent, structured, and modern logging style across several storage-related files.

  • Replaced LOG macros with their corresponding logging functions throughout the storage, scripting, and utility modules.
  • Updated format strings to use "{}" placeholders for parameter insertion.
  • Made minor stylistic changes in initializer lists and formatting for consistency.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/storage/storage.cc Replaced LOG calls with info/warn/error logging calls.
src/storage/scripting.cc Updated logging for Lua commands with new logging funcs.
src/storage/iterator.h Adjusted initializer lists for consistency.
src/storage/event_listener.cc Refactored logging calls in event callbacks.
src/storage/compaction_checker.cc Updated logging for compaction operations.
src/storage/compact_filter.cc Replaced logging calls with warn/error and debug.
src/storage/batch_extractor.cc Refactored LOG messages to error/warn messages.

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 7, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
18.7% Coverage on New Code (required ≥ 50%)

See analysis details on SonarQube Cloud

@PragmaTwice PragmaTwice merged commit 1ee52eb into apache:unstable May 7, 2025
34 of 35 checks passed
@SharonIV0x86 SharonIV0x86 deleted the chore/replace-logging-in-storage branch May 7, 2025 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants