Unmarshal kv log#1
Merged
zier-one merged 12 commits intopingcap:masterfrom Sep 9, 2019
zier-one:marshaler
Merged
Conversation
added 2 commits
September 5, 2019 17:50
# Conflicts: # cdc/buffer.go # cdc/cdctest/mock_tidb.go # cdc/cdctest/mock_tidb_test.go # cdc/puller.go # cdc/util.go
july2993
reviewed
Sep 5, 2019
Contributor
july2993
left a comment
There was a problem hiding this comment.
I think you need to get model.TableInfo before decode sql row.
for pk is handle, get delete primary key from the {record_id -> row data}
for pk is not handle, get delete primary key from {primary index -> record_id}
cdc/codec.go
Outdated
| } | ||
|
|
||
| func hasRecordPrefix(key []byte) bool { | ||
| return key[0] == recordPrefix[0] && key[1] == recordPrefix[1] |
Contributor
There was a problem hiding this comment.
why not use bytes.HasPrefix
Contributor
Author
There was a problem hiding this comment.
because this code is copied from tidb.
https://github.com/pingcap/tidb/blob/master/tablecodec/tablecodec.go#L89
I think it will more efficient.
suzaku
reviewed
Sep 6, 2019
| var recordId int64 | ||
| if len(raw.Value) > 0 { | ||
| buf := bytes.NewBuffer(raw.Value) | ||
| err = binary.Read(buf, binary.BigEndian, &recordId) |
Contributor
There was a problem hiding this comment.
Just use int64(binary.BigEndian.Uint64(raw.Value))?
Contributor
Author
There was a problem hiding this comment.
i tried, it will return a wrong value
added 2 commits
September 6, 2019 18:28
Contributor
Author
5kbpers
pushed a commit
to 5kbpers/ticdc
that referenced
this pull request
Aug 24, 2020
decode binary data of kv change log
gejibin
added a commit
to liuzix/ticdc
that referenced
this pull request
Mar 3, 2021
adding jdq avro
joechenrh
added a commit
to joechenrh/tiflow
that referenced
this pull request
Mar 18, 2026
…gcap#5) 1. Restore nil-guard on LoadChunk result to prevent panic when checkpoint file contains no chunk info. 2. Extract ChecksumCapableSource sub-interface from Source to avoid widening the core interface with checksum-only methods. Remove dead PreferGlobalChecksum/GetChecksumOnlyIterator from MySQLSources. 3. Rename PreferGlobalChecksum to type-assertion based capability check via ChecksumCapableSource, removing the misleading "Prefer" naming. 4. Add log.Warn before break in equalByGlobalChecksum error path so operators can see why remaining tables were skipped. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
joechenrh
added a commit
to joechenrh/tiflow
that referenced
this pull request
Mar 18, 2026
…gcap#5) 1. Restore nil-guard on LoadChunk result to prevent panic when checkpoint file contains no chunk info. 2. Extract ChecksumCapableSource sub-interface from Source to avoid widening the core interface with checksum-only methods. Remove dead PreferGlobalChecksum/GetChecksumOnlyIterator from MySQLSources. 3. Rename PreferGlobalChecksum to type-assertion based capability check via ChecksumCapableSource, removing the misleading "Prefer" naming. 4. Add log.Warn before break in equalByGlobalChecksum error path so operators can see why remaining tables were skipped. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
parse binary data of kv change log to structured data