Fix output for binary keys in -verbose mode.#1559
Merged
meiji163 merged 2 commits intogithub:masterfrom Jun 5, 2025
Merged
Conversation
When migrating a table with a `binary` key in `-verbose` mode, different sequences of bytes may prevent execution output from being logged, or correctly logged, to the console. This happens because the `MigrationRange*Values` are printed to the screen without any type of encoding. One particularly problematic sequence is `0x27`, `Escape`, which causes the terminal to stop logging for the duration of the migration: ``` 2025-05-23 11:53:27 INFO Listening on unix socket file: /tmp/gh-ost.test.binfoo.sock 2025-05-23 11:53:27 INFO Intercepted changelog state ReadMigrationRangeValues 2025-05-23 11:53:27 INFO Handled changelog state ReadMigrationRangeValues 2025-05-23 11:53:27 INFO Migration min values: [ ``` This commit changes the to-string rendering for `binary` keys, rendering the values as a hex string rather than an unescaped series of bytes.
meiji163
approved these changes
May 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When migrating a table with a
binarykey in-verbosemode, different sequences of bytes may prevent execution output from being logged, or correctly logged, to the console.This happens because the
MigrationRange*Valuesare printed to the screen without any type of encoding. One particularly problematic sequence is27/0x1b,Escape, which causes the terminal to stop logging for the duration of the migration:This commit changes the to-string rendering for
binarykeys, rendering the values as a hex string rather than an unescaped series of bytes:While this build passes and has the expected outcome locally, I'm not positive that this change to
StringColumnis used only for logging/debugging purposes. This is something I hope you can verify.script/cibuildreturns with no formatting errors, build errors or unit test errors.