Skip to content

(8.4)PS-11216: Timestamps needed in the GCS_DEBUG_TRACE file#6050

Open
jaideepkarande wants to merge 1 commit into
percona:8.4from
jaideepkarande:PS-11216-8.4
Open

(8.4)PS-11216: Timestamps needed in the GCS_DEBUG_TRACE file#6050
jaideepkarande wants to merge 1 commit into
percona:8.4from
jaideepkarande:PS-11216-8.4

Conversation

@jaideepkarande

Copy link
Copy Markdown

Every line written to GCS_DEBUG_TRACE now carries an ISO 8601 UTC timestamp with microsecond precision at the front of the line:

[YYYY-MM-DDTHH:MM:SS.uuuuuuZ] [MYSQL_GCS_DEBUG] [GCS]

@jaideepkarande
jaideepkarande marked this pull request as ready for review June 30, 2026 11:23
@jaideepkarande jaideepkarande changed the title PS-11216: Timestamps needed in the GCS_DEBUG_TRACE file (8.4)PS-11216: Timestamps needed in the GCS_DEBUG_TRACE file Jun 30, 2026
@jaideepkarande

Copy link
Copy Markdown
Author

https://ps80.cd.percona.com/job/percona-server-8.4-pipeline-parallel-mtr/1279/consoleFull
Only branch was renamed to tag 8.4 code changes remain same.

Comment thread plugin/group_replication/libmysqlgcs/src/interface/gcs_logging_system.cc Outdated
Comment thread plugin/group_replication/libmysqlgcs/src/interface/gcs_logging_system.cc Outdated
Comment thread mysql-test/suite/group_replication/t/gr_gcs_debug_trace_timestamps.test Outdated
Comment thread mysql-test/suite/group_replication/t/gr_gcs_debug_trace_timestamps.test Outdated
Every line written to GCS_DEBUG_TRACE now carries an ISO 8601 UTC
timestamp with microsecond precision at the front of the line:

  [YYYY-MM-DDTHH:MM:SS.uuuuuuZ] [MYSQL_GCS_DEBUG] [GCS] <message>
@jaideepkarande

Copy link
Copy Markdown
Author

https://ps80.cd.percona.com/job/percona-server-8.4-pipeline-parallel-mtr/1281/consoleFull

main.all_persisted_variables failed

-include/assert.inc [Expect 490 persisted variables in the table.]
+include/assert.inc [Expect 491 persisted variables in the table.]

Failing test case shows extra persisted variable not related to the code changes.

@kamil-holubicki kamil-holubicki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please consider comments about cosmetic things


/**
Add extra information as a message prefix.
[YYYY-MM-DDTHH:MM:SS.uuuuuuZ] [MYSQL_GCS_DEBUG] [GCS] <message>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Claude:
Header docstring inconsistency. gcs_logging_system.h:661 — the format example is dropped into the Doxygen brief without any
@code/formatting; brackets can trip Doxygen. Prefer:
/**
Format: [YYYY-MM-DDTHH:MM:SS.uuuuuuZ] [MYSQL_GCS_DEBUG] [GCS]

################################################################################
# PS-11216: Timestamps needed in the GCS_DEBUG_TRACE file
#
# This test case veritfy that every log written to GCS_DEBUG_TRACE carries a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

veritfy -> verify

const long usec = static_cast<long>(us % 1000000);
struct tm tm_info;
if (gmtime_r(&sec, &tm_info) == nullptr) return 0;
int len = sprintf(buf, "[%04d-%02d-%02dT%02d:%02d:%02d.%06ldZ] ",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It is not critical, as it is constant string by format, but suggestion:
sprintf → snprintf(buf, 32, …)

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