Skip to content

Conversation

@khustup2
Copy link
Contributor

@khustup2 khustup2 commented Jan 4, 2026

🚀 🚀 Pull Request

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Things to be aware of

Things to worry about

Additional Context

Copilot AI review requested due to automatic review settings January 4, 2026 22:12
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 removes unsafe logging that could cause issues during error handling and fixes a bug where empty UUID strings were not properly handled as NULL values, causing parsing errors when querying tables with UUID columns.

Key Changes:

  • Removed diagnostic logging (memory reports, backtraces, runtime stats) that was being called in unsafe contexts
  • Added NULL handling for empty UUID strings in two code paths to prevent "Failed to parse UUID string" errors
  • Added comprehensive test coverage for the UUID empty string scenario

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
cpp/deeplake_pg/reporter.hpp Removed memory reporting, backtrace logging, and runtime statistics functions that were unsafe during signal handling and cleanup
cpp/deeplake_pg/extension_init.cpp Removed warning logs from exception handlers during transaction cleanup to prevent cascading errors
cpp/deeplake_pg/duckdb_deeplake_scan.cpp Added empty string checks before UUID parsing to treat empty strings as NULL and prevent parsing errors
postgres/tests/py_tests/test_uuid.py Added test case to verify empty UUID strings are handled correctly when adding UUID columns to existing tables

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 11 to 14
inline static void signal_handler(int signal)
{
elog(NOTICE, "Caught signal %d (%s)\n", signal, strsignal(signal));
elog(NOTICE, "%s", base::backtrace().c_str());
print_memory_report();
fflush(stderr);
_exit(signal);
}
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

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

The signal_handler function now only calls _exit without any logging or diagnostic information. While this may be intentional to fix unsafe logging, it makes debugging signal-related crashes much more difficult. Consider adding a comment explaining why logging was removed and what alternative debugging approach should be used.

Copilot uses AI. Check for mistakes.
elog(INFO, "%s: %.2f %s", task_name_.data(), duration, period_name.data());
}
}
~runtime_printer() = default;
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

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

The runtime_printer destructor is now defaulted, but the class still stores start_time_ member that appears unused. This creates dead code - either remove the start_time_ member variable or restore the timing functionality with a safer logging approach.

Copilot uses AI. Check for mistakes.
pg::table_storage::instance().reset_requested_columns();
} catch (const std::exception& e) {
elog(WARNING, "Error during transaction cleanup: %s", e.what());
// Silently handle cleanup errors
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

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

While silencing errors may prevent cascading failures, completely silent error handling makes debugging difficult. Consider using a safer logging mechanism (e.g., appending to a file) or add a comment explaining what specific cascading error this prevents and how to debug issues when cleanup fails.

Copilot uses AI. Check for mistakes.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 4, 2026

@khustup2 khustup2 merged commit 7a7876d into main Jan 4, 2026
6 checks passed
@khustup2 khustup2 deleted the bugfixes branch January 4, 2026 22:48
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