Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
358 commits
Select commit Hold shift + click to select a range
0c9303e
Fix case db_sync by send TEST_* query to target (#52)
w41ter Mar 22, 2024
27e3769
Fix case db_sync by send TEST_* query to target (#55)
w41ter Apr 7, 2024
483833d
fix sync db error when table name is keyword (#53)
lsy3993 Apr 7, 2024
b9b9645
add option to start pprof server (#51)
lsy3993 Apr 8, 2024
9b90f28
skip view when set binlog.enable (#50)
lsy3993 Apr 8, 2024
4e93f0f
Make the constants configurable (#49)
ButterBright Apr 8, 2024
daf36c8
fix start helper parameter (#57)
lsy3993 Apr 15, 2024
19ea40f
Add golang workflows
w41ter Apr 16, 2024
98dd622
Drop the table if restore is cancelled by signature not matched (#58)
w41ter Apr 16, 2024
b664229
Update changelog after 2.0.3.8
w41ter Apr 16, 2024
7b79d5b
Fix bloomfilter index case by wait add index finish (#56)
w41ter Apr 10, 2024
1753338
Fix materialized view
w41ter Apr 10, 2024
40904a6
fix table key word (#60)
lsy3993 Apr 17, 2024
420c7e1
fix syntax of auto partition in db sync test (#61)
lsy3993 Apr 22, 2024
b4f8b38
Add tarball target
w41ter Apr 23, 2024
fde26c0
Release 2.0.3.9
w41ter Apr 23, 2024
74262cd
Add LICENSE (#63)
w41ter Apr 24, 2024
a661efc
Save key time point for ccr job progress (#64)
w41ter Apr 26, 2024
3e18d2c
Fix keyword name in ADD PARTITION (#65)
w41ter Apr 26, 2024
510fc4e
Fix drop table with keyword (#67)
w41ter Apr 28, 2024
5662c81
Fix drop table keyword name if table schema conflicts (#68)
w41ter Apr 28, 2024
852a5a2
Fix test keyword name test (#69)
w41ter Apr 28, 2024
0fc2e5a
create a handler to view job details (#66)
lsy3993 Apr 28, 2024
e4e6559
Fix test inverted index (#70)
w41ter Apr 28, 2024
211ba02
Fix keyword name in job.go (#71)
w41ter Apr 28, 2024
dea2407
create a handler can get job progress (#72)
lsy3993 Apr 29, 2024
ea69bb7
Avoid restart full sync when network interrupt or process crash (#75)
w41ter May 10, 2024
a4c3ce9
Update CHANGELOG for 2.1.3
w41ter May 10, 2024
0411b34
Add platform as tarball suffix
w41ter May 9, 2024
dfce7d3
Add drop partition usercase
w41ter May 11, 2024
32f1d78
add more desc about operations (#78)
lsy3993 May 14, 2024
39d9f8d
Add postgresql as meta db (#77)
lsy3993 May 15, 2024
a67562f
Fix job progress key time point (#80)
w41ter May 22, 2024
44f2e27
Fix request redirection (#81)
lsy3993 May 22, 2024
e5e798f
Fix could not found partition id after drop partition (#82)
w41ter May 22, 2024
582dd5b
add ccr variant case (#83)
XueYuhai May 23, 2024
a7a12b3
add mtmv case (#84)
lsy3993 May 23, 2024
d8fb587
Move sql related operations into Specer (#85)
w41ter May 24, 2024
884c455
Fix binlog lost (#86)
w41ter May 24, 2024
dc2ab91
Fix add partition sql and add adding partition tests (#88)
w41ter May 27, 2024
8f0fc94
Add adding partition test (#89)
w41ter May 27, 2024
0596437
remove mtmv case (#90)
lsy3993 May 28, 2024
bcf5f86
add acid case (#87)
lsy3993 May 28, 2024
3c6d538
Save prev commit seq if progress is done (#91)
w41ter May 28, 2024
fc78926
Correct add list partition sql (#92)
w41ter May 28, 2024
3a559fa
fix acid case (#93)
lsy3993 May 29, 2024
00af580
Change default connect & rpc timeout to 10s,30s (#94)
w41ter May 29, 2024
fc4ad23
add connect and rpc timeout in start (#95)
lsy3993 May 29, 2024
f9d08d2
remove acid table test (#96)
lsy3993 May 29, 2024
ad24a53
Filter temp partition upserts and add insert overwrite case (#97)
w41ter May 30, 2024
a5d1e9c
Fix add partition case (#98)
w41ter May 30, 2024
ac1b294
Fix add partition sql (#99)
w41ter May 30, 2024
fb3b790
Fix insert overwrite cases (#101)
w41ter Jun 3, 2024
61d6de3
fix create/drop view bug (#100)
lsy3993 Jun 3, 2024
290069a
Remove useless CreateTable (#102)
w41ter Jun 3, 2024
d583e07
Log snapshot meta size (#103)
w41ter Jun 4, 2024
34c3bd2
Check backup/restore state for test insert overwrite case (#105)
w41ter Jun 6, 2024
5f958af
Update CHANGELOG.md (#110)
w41ter Jun 12, 2024
f4635e1
add view and mv case (#104)
lsy3993 Jun 12, 2024
859c5ba
filter dropped table when restore (#115)
lsy3993 Jun 14, 2024
7356824
fix view case (#116)
lsy3993 Jun 18, 2024
8b7449a
Fix add partition case by check the partition item (#118)
w41ter Jul 5, 2024
f801ce9
Filter dropped partitions instead of fullsync (#117)
w41ter Jul 5, 2024
1459383
Make AddPartition record compatibile with alternative json name (#121)
w41ter Jul 15, 2024
caa48f3
Refactor suites layout (#122)
w41ter Jul 16, 2024
9302591
get jobs from GetAllData (#120)
lsy3993 Jul 16, 2024
abfb6e9
Filter dropped tables (#123)
w41ter Jul 18, 2024
730237f
Update CHANGELOG.md
w41ter Jul 30, 2024
3081c2c
Check job state before update progress (#124)
w41ter Aug 1, 2024
7e316dc
Support partial snapshot to reduce fullsync overhead (#125)
w41ter Aug 5, 2024
fc46820
fix no lag when get_lag successed (#126)
lsy3993 Aug 7, 2024
1f87be0
Fix replace partial partition test case assert content (#127)
w41ter Aug 7, 2024
c3d5310
Fix cases (#129)
w41ter Aug 9, 2024
3ab568e
Restore snapshot with clean_restore during fullsync (#128)
w41ter Aug 14, 2024
1d1c3cf
use full argument (#130)
lsy3993 Aug 15, 2024
38bc863
Fix incorrect table mapping for dropped tables (#132)
w41ter Aug 19, 2024
dc23b3b
Improve binlog logs (#133)
w41ter Aug 19, 2024
9ed2a6a
Fix downstream db in suites (#134)
w41ter Aug 20, 2024
13ff5d6
Improve ci action (#135)
w41ter Aug 20, 2024
970396b
SHOW RESTORE RESULT
w41ter Aug 22, 2024
5745199
Allow create ccr job even if the target table alrady exists (#136)
w41ter Aug 22, 2024
e560ad6
Move table to recycle bin if the signature is not matched (#137)
w41ter Aug 22, 2024
e233730
Update CHANGELOG.md
w41ter Aug 28, 2024
8db51f3
Add schema change detail cases (#143)
w41ter Aug 29, 2024
b3dc980
Add partial sync table name check (#144)
w41ter Aug 29, 2024
45ae400
Make clearing meta cache clearer (#145)
w41ter Aug 30, 2024
142f94b
Support partial sync with table alias (#148)
w41ter Sep 2, 2024
568c299
Fix job progress test (#150)
w41ter Sep 5, 2024
4cb9481
Add allow_table_exists test (#146)
w41ter Sep 5, 2024
55491a5
Fix creating view and getting views related to specific table (#149)
smallx Sep 5, 2024
4618de6
Support partial sync during schema change (#151)
w41ter Sep 9, 2024
f75dbc0
Support rename operator (#147)
lsy3993 Sep 9, 2024
d9dbcc3
Drop view if the schema is not matched (#152)
w41ter Sep 9, 2024
9abad4c
Disable clean tables & partitions by default (#153)
w41ter Sep 9, 2024
23027cc
Fix test_add_partition case (#154)
w41ter Sep 9, 2024
fa6d54e
Skip variant test in doris 2.0 (#155)
w41ter Sep 9, 2024
bd3e043
Skip inverted index with unique mor value (#156)
w41ter Sep 9, 2024
410f7f3
Skip some cases doris 2.0 not supported yet (#157)
w41ter Sep 9, 2024
8f29331
Skip db sync rename table in 2.0/2.1 (#158)
w41ter Sep 9, 2024
1f5acc0
Make schema change cases compatible with 2.0 (#159)
w41ter Sep 9, 2024
8e15f6c
Skip AUTO PARTITION in doris 2.0 (#160)
w41ter Sep 9, 2024
d52207b
Allow table exists not support 2.1
w41ter Sep 9, 2024
758c8ee
Delete sync job before test keyword name
w41ter Sep 9, 2024
f3ebc2b
2.0 not support INSERT OVERWRITE yet
w41ter Sep 9, 2024
83534df
2.0 default value has \"\"
w41ter Sep 9, 2024
69a5fcd
Fix view already exists
w41ter Sep 9, 2024
39b35e8
Delete job first for db sync suites
w41ter Sep 9, 2024
f47fb3a
Fix test keyword name
w41ter Sep 9, 2024
77255ac
Fix view and mv test
w41ter Sep 9, 2024
65dc10a
Disable clean tables & partitions by default (#161)
w41ter Sep 10, 2024
baf8c03
Fix view and mv test
w41ter Sep 10, 2024
955aba3
Handle table not found error during begin txn (#162)
w41ter Sep 11, 2024
8bc7df6
Clear the staled table mapping if dest table is not found (#163)
w41ter Sep 11, 2024
0d12c8d
Rollback job progress when table is not found (#164)
w41ter Sep 11, 2024
509f2b6
Sync thrift with doris master (#165)
w41ter Sep 11, 2024
f0302d0
Add feature atomic restore (#166)
w41ter Sep 11, 2024
a0caa7d
Add force_fullsync http API (#167)
w41ter Sep 12, 2024
8c6fffa
Disable test sync view twice in 2.0/2.1
w41ter Sep 12, 2024
4f2a5a7
Support drop view (#169)
w41ter Sep 14, 2024
426605d
Drop view if it exists before creating table (#170)
w41ter Sep 14, 2024
9472dd4
Fix create table failed message (#171)
w41ter Sep 14, 2024
334ab55
Update CHANGELOG.md
w41ter Sep 14, 2024
749afb3
Simplify regression suites (#172)
w41ter Sep 19, 2024
afef42a
Fix partial snapshot table alias in db sync mode (#173)
w41ter Sep 19, 2024
abaf6c8
Add db replace partition test (#174)
w41ter Sep 19, 2024
334dfe4
Add http api /features to list the feature flags (#175)
w41ter Sep 19, 2024
c7ee793
Fix error when hyphen in table name (#168)
lsy3993 Sep 20, 2024
bd770a7
Fix table alias when handle lightning schema change (#176)
w41ter Sep 20, 2024
605ee9c
Support rename column (#139)
smallx Sep 20, 2024
6907e1c
Add table sync alias case (#177)
w41ter Sep 20, 2024
093c949
Refresh dest table id after partial sync (#178)
w41ter Sep 24, 2024
da78418
Support table alias instead of drop during fullsync (#179)
w41ter Sep 24, 2024
5598acd
Compatible REPLACE_IF_NOT_NULL default value (#180)
w41ter Sep 24, 2024
2b91cda
Add mem/goroutine/jobs monitor (#181)
w41ter Sep 24, 2024
5d5ec61
Log timestamp add milliseconds (#182)
w41ter Sep 24, 2024
50cf547
Fix nil pointer of job.progress (#183)
w41ter Sep 24, 2024
5a69d8f
Filter dropped indexes to avoid META NOT FOUND (#185)
w41ter Sep 25, 2024
ce1ce36
Fix partial sync with incremental data (#186)
w41ter Sep 25, 2024
0b37675
Filter shadow indexes upsert (#187)
w41ter Sep 26, 2024
66ae58d
Update CHANGELOG.md
w41ter Sep 26, 2024
9a9366d
Fix test_column_ops and row_storage case
w41ter Sep 26, 2024
294de2e
Fix test_column_ops test
w41ter Sep 26, 2024
5738a1b
Fix create dropped view (#188)
w41ter Sep 27, 2024
884dda2
Remove useless log
w41ter Sep 27, 2024
754ed09
Update CHANGELOG.md
w41ter Sep 30, 2024
8188433
Enable features
w41ter Sep 30, 2024
36581a8
Fix test_filter_dropped_indexes.groovy
w41ter Sep 30, 2024
1dc1e73
Add db sync truncate table case (#190)
w41ter Oct 9, 2024
ad437ee
Filter the committed binlogs (#191)
w41ter Oct 10, 2024
6eb9b76
Fix test_truncate_table and test_db_sync_signature_not_matched (#192)
w41ter Oct 11, 2024
8b0df43
fix test_db_sync_signature_not_matched (#193)
w41ter Oct 11, 2024
c9fd786
Reduce suites name size (#194)
w41ter Oct 11, 2024
18ff4fe
Limit Backend ingesting concurrency (#195)
w41ter Oct 12, 2024
cc411f7
Add mysql max allowed packet flag (#196)
w41ter Oct 21, 2024
b2859fe
Support modify comment (#140)
smallx Oct 21, 2024
2c6bb5e
Cancel running backup/restore jobs before fullsync (#197)
w41ter Oct 23, 2024
69ac677
Avoid lock job when get job status (#198)
w41ter Oct 23, 2024
2defd4a
Add cancel_conflict_backup_restore_job flag (#199)
w41ter Oct 24, 2024
6062cb7
Cancel restore job only when feature flag open (#200)
w41ter Oct 25, 2024
bffb4b1
Avoid blocking job in full/partial sync (#201)
w41ter Oct 25, 2024
ab3ad19
skip external table when set binlog enable
lsy3993 Oct 28, 2024
2590d49
spell error
lsy3993 Oct 28, 2024
d2d6b6f
Skip unsupported tables during fullsync
w41ter Oct 28, 2024
ff9ee9a
Avoid persisting snapshot job info and meta in job progress (#204)
w41ter Oct 29, 2024
36b71b0
Build table mapping from snapshot job info (#205)
w41ter Oct 30, 2024
0ac7589
Fix fullsync with alias (#207)
w41ter Oct 30, 2024
f660368
Handle the binlogs wrapped in barrier log (#208)
w41ter Oct 31, 2024
d85c59a
Support rename table in 2.0/2.1 (#209)
w41ter Oct 31, 2024
3534ef6
Support rename column in 2.0/2.1 (#210)
w41ter Oct 31, 2024
4188555
Fix infinite loop when backup/restore job failed (#206)
w41ter Oct 31, 2024
c5e99d3
Avoid logging empty db error, wait instead (#211)
w41ter Nov 1, 2024
b8bfa89
Fix add partition with keyword name (#212)
w41ter Nov 1, 2024
b9fdf5b
Skip modify partitions binlog (#213)
w41ter Nov 1, 2024
503dbb7
Fix column ops suite
w41ter Nov 1, 2024
25aec97
Skip tmp partition dropping (#214)
w41ter Nov 1, 2024
33aac76
Remove readOnly option for mysql (#215)
w41ter Nov 4, 2024
00ab124
Reuse the backup/restore task issued by the job itself (#218)
w41ter Nov 6, 2024
f9cca64
Reorg db/table sync suites (#219)
w41ter Nov 6, 2024
290fcc6
Fix test_ts_table_modify_comment case (#222)
w41ter Nov 8, 2024
7f03831
Support compressed snapshot to avoid thrift max message size limitati…
w41ter Nov 11, 2024
d13e2fd
Enable feature_reuse_running_backup_restore_job by default (#224)
w41ter Nov 11, 2024
cde0136
Fix reusing wrong backup/restore job (#226)
w41ter Nov 11, 2024
71239c4
Fix suites (#227)
w41ter Nov 11, 2024
5b934df
Add test for ccr sync rename partition name (#221)
wyxxxcat Nov 12, 2024
322c6a5
[test] Add test for db/tbl sync rename table column(#225)
wyxxxcat Nov 12, 2024
6c1e8b7
Support snapshot expiration (#229)
w41ter Nov 12, 2024
683a210
Fix drop partition with keyword name (#231)
w41ter Nov 12, 2024
2c81c97
Correct use of target_sql (#230)
wyxxxcat Nov 12, 2024
c4bcffd
Fix helper.is_version_supported (#233)
w41ter Nov 13, 2024
94bac01
Avoid using index name to build base index mapping (#235)
w41ter Nov 14, 2024
be2e37a
Add flag to skip rollup binlogs (#236)
w41ter Nov 14, 2024
5a685d3
Fix parallel creating table and fullsync (#237)
w41ter Nov 18, 2024
3dda2ab
Revert "Fix drop partition with keyword name (#231)" (#238)
w41ter Nov 18, 2024
89e2df1
Fix wrong table name dependencies (#239)
w41ter Nov 18, 2024
2c21118
Fix unknown table/partitions in partial snapshot (#240)
w41ter Nov 18, 2024
06a8abb
Skip overwritten tables in partial snapshot (#241)
w41ter Nov 18, 2024
6cc4e2c
Fix wrong test for rename partition (#243)
wyxxxcat Nov 19, 2024
ddae75b
add tests for schema change
wyxxxcat Nov 19, 2024
f738007
Support replace table binlog (#245)
w41ter Nov 19, 2024
2611de7
Check connection error (#247)
w41ter Nov 19, 2024
09b3eea
Filter the drop missing table binlog (#248)
w41ter Nov 19, 2024
bc5ab9f
Support drop view (#138)
smallx Nov 21, 2024
aea0eef
Fix partially committed replace table binlog (#249)
w41ter Nov 21, 2024
3ec9ff2
Support Modify ViewDef binlog (#184)
xiaoming12306 Nov 22, 2024
5c6dff8
Support inverted index binlog (#252)
w41ter Nov 22, 2024
c7d79d1
Add drop view test (#253)
w41ter Nov 22, 2024
9a63f6a
Fix test_cds_tbl_alter_replace (#254)
w41ter Nov 22, 2024
ebf6915
Fix partition dropped in partial snapshot (#255)
w41ter Nov 22, 2024
924e447
Add ts/ds test for tbl model (#244)
wyxxxcat Nov 22, 2024
1c6ed8b
Add ts/ds test for properties partition and bucket (#246)
wyxxxcat Nov 22, 2024
d10a486
Organize index related suites (#256)
w41ter Nov 25, 2024
7fe3be2
Add and drop [ng]bloom filter suites (#257)
w41ter Nov 26, 2024
c49e8e3
Add bloom filter fpp suites (#258)
w41ter Nov 26, 2024
2a4d0c6
Add ts/ds test for table properties (#251)
wyxxxcat Nov 26, 2024
7ee90cc
Support txn insert when table sync (#234)
lsy3993 Nov 26, 2024
36de25a
Add flag to controll txn insert (#259)
w41ter Nov 26, 2024
5554fb3
Fix problem caused by database name too long for test (#260)
wyxxxcat Nov 26, 2024
281cc8c
fix format (#261)
w41ter Nov 26, 2024
ec4aa48
Fix create table if table already exists (#262)
w41ter Nov 27, 2024
c450643
Add docs for ccr regression test (#266)
wyxxxcat Nov 27, 2024
54c405a
Refactor partial snapshot with replace/rename (#267)
w41ter Nov 27, 2024
f1ccabe
Fix incorrect test (#265)
wyxxxcat Nov 27, 2024
57efa0b
Support rename partition/rollup (#268)
w41ter Nov 27, 2024
367b64a
Support add/drop rollup binlogs (#269)
w41ter Nov 27, 2024
300ffae
Fix modify view info/modify comment binlog in barrier log (#270)
w41ter Nov 27, 2024
1f831f0
Add rollup schema change cases (#272)
w41ter Nov 28, 2024
5b0725a
Fix alter view def (#273)
w41ter Nov 28, 2024
4051aa0
[improve] API job_progress shouldn't returns the data field of job pr…
wyxxxcat Nov 28, 2024
37b2cf2
Supplement table property compaction_policy test (#274)
wyxxxcat Nov 28, 2024
a507507
Fix restore with view (#275)
w41ter Nov 28, 2024
904ec71
fix test_ds_mv_basic/test_ds_view_basic (#276)
w41ter Nov 28, 2024
641035b
Fix test_ds_view_basic (#277)
w41ter Nov 28, 2024
3187cbd
Support replace table in table sync (#279)
w41ter Nov 29, 2024
c276db3
Update CHANGELOG.md (#281)
w41ter Nov 29, 2024
98db57a
Retry handle upsert binlog, to fix meta error (#282)
w41ter Nov 29, 2024
ffa995a
Fix wrong infinity partition key in create table sql (#285)
w41ter Dec 2, 2024
7efc7ab
Support create table with agg_state (#286)
w41ter Dec 2, 2024
1638bac
Fix test_ds_tbl_res_agg_state (#287)
w41ter Dec 3, 2024
4d72f8c
Support private IP and public IP (#288)
w41ter Dec 3, 2024
4a1ea02
Update operations.md (#289)
w41ter Dec 3, 2024
a910cf5
Add alter table property for ds/ts test (#264)
wyxxxcat Dec 4, 2024
49a8ca4
Fix spelling mistake (#291)
lsy3993 Dec 5, 2024
1d97afe
Add db incremental sync test for table property (#280)
wyxxxcat Dec 5, 2024
7d49241
Support add/drop multi inverted indexes (#296)
w41ter Dec 6, 2024
a56d056
Fix fullsync commit seq with views (#297)
w41ter Dec 6, 2024
c6f99a1
[TEST] fix error test for ccr (#300)
wyxxxcat Dec 11, 2024
97de4e3
Fix be rpc leaks in rpc factory (#299)
w41ter Dec 11, 2024
a110d63
[feat](binlog) Add Support recover binlog (#284)
Vallishp Dec 11, 2024
8955600
Fix format (#302)
w41ter Dec 11, 2024
b18ce73
[Enhancement] add support for restore to ccr
Vallishp Dec 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
29 changes: 29 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go

on:
push:
branches: [ "dev", "branch-2.0", "branch-2.1", "branch-3.0" ]
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Format
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi

- name: Build
run: make

- name: Test
run: make test
29 changes: 29 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: golangci-lint
on:
push:
branches:
- main
- dev
- branch-3.0
- branch-2.1
- branch-2.0
pull_request:

permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
bin
output
ccr.db
backup
tarball
159 changes: 156 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,169 @@
# 更新日志

## v 0.5
### Fix

## 3.0.4/2.1.8

注意:从这个版本开始 doris 和 ccr-syncer 的 2.0 版本将不再更新,需要使用 ccr-syncer 的需要先升级到 2.1 及以上版本。

### Fix

- 修复 table name 中带 `-` 无法同步的问题 (selectdb/ccr-syncer#168)
- 修复部分同步下可能同步多次增量数据的问题 (selectdb/ccr-syncer#186)
- 修复 create 又立即 drop 的情况下无法找到 table 的问题 (selectdb/ccr-syncer#188)
- 跳过不支持的 table 类型,比如 ES TABLE
- 避免在同步快照、binlog 期间对上游 name 产生依赖 (selectdb/ccr-syncer#205, selectdb/ccr-syncer#239)
- 修复全量同步期间 view 的别名问题 (selectdb/ccr-syncer#207)
- 修复 add partition with keyword name 的问题 (selectdb/ccr-syncer#212)
- 跳过 drop tmp partition (selectdb/ccr-syncer#214)
- 修复快照过期的问题,过期后会重做 (selectdb/ccr-syncer#229)
- 修复 rename 导致的上下游 index name 无法匹配的问题 (selectdb/ccr-syncer#235)
- 修复并行创建 table/backup 时 table 丢失的问题 (selectdb/ccr-syncer#237)
- 修复 partial snapshot 期间,上游 table/partition 已经被删除/重命名/替换的问题 (selectdb/ccr-syncer#240, selectdb/ccr-syncer#241, selectdb/ccr-syncer#249, selectdb/ccr-syncer#255)
- 检查 database connection 错误 (selectdb/ccr-syncer#247)
- 过滤已经被删除的 table (selectdb/ccr-syncer#248)
- 修复 create table 时下游 table 已经存在的问题 (selectdb/ccr-syncer#161)

### Feature

- 支持 atomic restore,全量同步期间下游仍然可读 (selectdb/ccr-syncer#166)
- 支持处理包装在 barrier log 中的其他 binlog (主要用于在 2.0/2.1 上增加新增的 binlog 类型)(selectdb/ccr-syncer#208)
- 支持 rename table (2.1) (selectdb/ccr-syncer#209)
- 跳过 modify partition binlog (selectdb/ccr-syncer#213)
- 支持 modify comment binlog (selectdb/ccr-syncer#140)
- 支持 replace table binlog (selectdb/ccr-syncer#245)
- 支持 drop view binlog (selectdb/ccr-syncer#138)
- 支持 modify view def binlog (selectdb/ccr-syncer#184)
- 支持 inverted index 相关 binlog (selectdb/ccr-syncer#252)
- 支持 table sync 下的 txn insert (WIP) (selectdb/ccr-syncer#234, selectdb/ccr-syncer#259)
- 支持 rename partition/rollup binlogs (selectdb/ccr-syncer#268)
- 支持 add/drop rollup binlogs (selectdb/ccr-syncer#269)
- 支持 modify view/comment in 2.1 (selectdb/ccr-syncer#270, selectdb/ccr-syncer#273)
- 支持 table sync 下的 replace table (selectdb/ccr-syncer#279)

### Improve

- 支持同步 rename column,需要 doris xxxx (selectdb/ccr-syncer#139)
- 支持在全量同步过程中,遇到 table signature 不匹配时,使用 alias 替代 drop (selectdb/ccr-syncer#179)
- 增加 monitor,在日志中 dump 内存使用率 (selectdb/ccr-syncer#181)
- 过滤 schema change 删除的 indexes,避免全量同步 (selectdb/ccr-syncer#185)
- 过滤 schema change 创建的 shadow indexes 的更新,避免全量同步 (selectdb/ccr-syncer#187)
- 增加 `mysql_max_allowed_packet` 参数,控制 mysql sdk 允许发送的 packet 大小 (selectdb/ccr-syncer#196)
- 限制一个 JOB 中单个 BE 的 ingest 并发数,减少对 BE 的连接数和文件描述符消耗 (selectdb/ccr-syncer#195)
- 避免在获取 job status 等待锁 (selectdb/ccr-syncer#198)
- 避免 backup/restore 任务阻塞查询 ccr job progress (selectdb/ccr-syncer#201, selectdb/ccr-syncer#206)
- 避免将 snapshot job info 和 meta (这两个数据可能非常大)持久化到 mysql 中 (selectdb/ccr-syncer#204)
- 上游 db 中没有 table 时,打印 info 而不是 error (selectdb/ccr-syncer#211)
- 在 ccr syncer 重启后,复用由当前 job 发起的 backup/restore job (selectdb/ccr-syncer#218, selectdb/ccr-syncer#224, selectdb/ccr-syncer#226)
- 支持读取压缩后的快照/恢复快照时压缩,避免碰到 thrift max message size 限制 (selectdb/ccr-syncer#223)
- API job_progress 避免返回 persist data (selectdb/ccr-syncer#271)

## 2.0.15/2.1.6

### Fix

- 修复 `REPLACE_IF_NOT_NULL` 语句的默认值语法不兼容问题 (selectdb/ccr-syncer#180)
- 修复 table sync 下 partial snapshot 没有更新 dest table id 的问题 (selectdb/ccr-syncer#178)
- **修复 table sync with alias 时,lightning schema change 找不到 table 的问题** (selectdb/ccr-syncer#176)
- 修复 db sync 下 partial snapshot table 为空的问题 (selectdb/ccr-syncer#173)
- 修复 create table 时下游 view 已经存在的问题(先删除 view),feature gate: `feature_create_view_drop_exists` (selectdb/ccr-syncer#170,selectdb/ccr-syncer#171)
- 修复 table not found 时没有 rollback binlog 的问题
- **修复下游删表后重做 snapshot 是 table mapping 过期的问题 (selectdb/ccr-syncer#162,selectdb/ccr-syncer#163,selectdb/ccr-syncer#164)**
- 修复 full sync 期间 view already exists 的问题,如果 signature 不匹配会先删除 (selectdb/ccr-syncer#152)
- 修复 2.0 中 get view 逻辑,兼容 default_cluster 语法 (selectdb/ccr-syncer#149)
- 修复 job state 变化时仍然更新了 job progress 的问题,对之前的逻辑无影响,主要用于支持 partial sync (selectdb/ccr-syncer#124)
- 修复 get_lag 接口中不含 lag 的问题 (selectdb/ccr-syncer#126)
- 修复下游 restore 时未清理 orphan tables/partitions 的问题 (selectdb/ccr-syncer#128)
- 备注: 暂时禁用,因为 doris 侧发现了 bug (selectdb/ccr-syncer#153,selectdb/ccr-syncer#161)
- **修复下游删表后重做 snapshot 时 dest meta cache 过期的问题 (selectdb/ccr-syncer#132)**

### Feature

- 增加 `/force_fullsync` 用于强制触发 fullsync (selectdb/ccr-syncer#167)
- 增加 `/features` 接口,用于列出当前有哪些 feature 以及是否打开 (selectdb/ccr-syncer#175)
- 支持同步 drop view(drop table 失败后使用 drop view 重试)(selectdb/ccr-syncer#169)
- 支持同步 rename 操作 (selectdb/ccr-syncer#147)
- schema change 使用 partial sync 而不是 fullsync (selectdb/ccr-syncer#151)
- partial sync 使用 rename 而不是直接修改 table,因此表的读写在同步过程中不受影响 (selectdb/ccr-syncer#148)
- 支持 partial sync,减少需要同步的数据量 (selectdb/ccr-syncer#125)
- 添加参数 `allowTableExists`,允许在下游 table 存在时,仍然创建 ccr job(如果 schema 不一致,会自动删表重建)(selectdb/ccr-syncer#136)

### Improve

- 日志输出 milliseconds (selectdb/ccr-syncer#182)
- 如果下游表的 schema 不一致,则将表移动到 RecycleBin 中(之前是强制删除)(selectdb/ccr-syncer#137)

## 2.0.14/2.1.5

### Fix

- 过滤已经删除的 partitions,避免 full sync,需要 doris 2.0.14/2.1.5 (selectdb/ccr-syncer#117)
- 过滤已经删除的 tables,避免 full sync (selectdb/ccr-syncer#123)
- 兼容 doris 3.0 alternative json name,doris 3.0 必须使用该版本的 CCR syncer (selectdb/ccr-syncer#121)
- 修复 list jobs 接口在高可用环境下不可用的问题 (selectdb/ccr-syncer#120)

## 2.0.11

对应 doris 2.0.11。

### Feature

- 支持以 postgresql 作为 ccr-syncer 的元数据库 (selectdb/ccr-syncer#77)
- 支持 insert overwrite 相关操作 (selectdb/ccr-syncer#97,selectdb/ccr-syncer#99)

### Fix

- 修复 drop partition 后因找不到 partition id 而无法继续同步的问题 (selectdb/ccr-syncer#82)
- 修复高可用模式下接口无法 redirect 的问题 (selectdb/ccr-syncer#81)
- 修复 binlog 可能因同步失败而丢失的问题 (selectdb/ccr-syncer#86,selectdb/ccr-syncer#91)
- 修改 connect 和 rpc 超时时间默认值,connect 默认 10s,rpc 默认 30s (selectdb/ccr-syncer#94,selectdb/ccr-syncer#95)
- 修复 view 和 materialized view 使用造成空指针问题 (selectdb/ccr-syncer#100)
- 修复 add partition sql 错误的问题 (selectdb/ccr-syncer#99)


## 2.1.3/2.0.3.10

### Fix

- 修复因与上下游 FE 网络中断而触发 full sync 的问题

### Feature

- 增加 `/job_progress` 接口用于获取 JOB 进度
- 增加 `/job_details` 接口用于获取 JOB 信息
- 保留 job 状态变更的各个时间点,并在 `/job_progress` 接口中展示

### Fix

- 修复若干 keywords 没有 escape 的问题

## 2.0.3.9

配合 doris 2.0.9 版本

### Feature

- 添加选项以启动 pprof server
- 允许配置 rpc 合 connection 超时

### Fix

- restore 每次重试时使用不同的 label 名
- update table 失败时(目标表不存在)会触发快照同步
- 修复同步 sql 中包含关键字的问题
- 如果恢复时碰到表 schema 发生变化,会先删表再重试恢复

## 0.5

### 支持高可用
- 现在可以部署多个Syncer节点来保证CCR功能的高可用。
- db是Syncer集群划分的依据,同一个集群下的Syncer共用一个db。
- Syncer集群采用对称设计,每个Syncer都会相对独立的执行被分配到的job。在某个Syncer节点down掉后,它的jobs会依据负载均衡算法被分给其他Syncer节点。

## v 0.4
## 0.4
* 增加 enable_db_binlog.sh 方便用户对整库开启binlog

## v 0.3
## 0.3

### LOG

Expand Down
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
This free license agreement is made between SelectDB Inc. (hereinafter referred to as "SelectDB", "we", "our" or "us") and the users ("user", "your" or "you") of the SelectDB products. SelectDB products refer to the software and services provided by SelectDB, including any updates, error fixes, and documentation. You acknowledge that you have fully read, understood and accepted this agreement in its entirety before you begin a trial or purchase of SelectDB products or services. You agree that by clicking the "agree" box or similar or using our product and services, you are agreeing to enter to this agreement, which is a legally binding contract between you and SelectDB. If you do not agree with any provision of this agreement, you must not purchase or use any of our services.
SelectDB reserves the right to change our products and services in accordance with applicable laws and our corporate policies without prior notice. We will post the changes on SelectDB.io. You agree that by continuing to use our services after the announcement of any changes to this agreement, you acknowledge that you have fully read, understood and accepted the modified products and services and will use our products and services in accordance with the modified agreement. If you disagree with any changes, you should no longer use our products and services.
License Rights and Limitations
SelectDB grants you a free, non-exclusive, non-transferable, limited license to use the SelectDB products.
- You have the right to install and use the SelectDB product or service on multiple computers, and run it for your personal use or internal business operations, subject to the terms of this agreement.
- You may redistribute the unmodified software and product documentation in accordance with the terms of this agreement, provided that you do not charge any fees related to such distribution or use of the software.
The effectiveness of your license is subject to the following conditions:
- You shall not remove any proprietary notices or markings of SelectDB or the licensor from the software or documentation.
- You shall not modify, reverse engineer, decompile, or attempt to extract the source code of the software.
- You shall not use the software for illegal purposes or violate any applicable laws or regulations.
Intellectual Property Rights
- All intellectual property rights of SelectDB, including but not limited to copyrights, patents, and trademarks, are owned by the licensor.
- This agreement does not grant the user any intellectual property rights.
Disclaimer
- The software is provided "as is" without any warranties, representations, conditions, or guarantees of any kind.
- The licensor does not provide any warranties regarding the suitability, merchantability, accuracy, reliability, or any other aspect of the software.
- To the maximum extent permitted by applicable law, the licensor shall not be liable for any direct, indirect, incidental, special, or consequential damages arising from the use of the software.
Miscellaneous
- This agreement constitutes the entire agreement between the licensor and the user regarding the use of the software and supersedes any prior oral or written agreements.
- This agreement shall be governed by the laws of Singapore in terms of interpretation, validity, and performance.
74 changes: 67 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,31 @@ tag := $(shell git describe --abbrev=0 --always --dirty --tags)
sha := $(shell git rev-parse --short HEAD)
git_tag_sha := $(tag):$(sha)

ifeq ($(shell uname -i),x86_64)
# Make them happy
platform := x64
else
platform := arm64
endif
tarball_suffix := $(tag)-$(platform)

LDFLAGS="-X 'github.com/selectdb/ccr_syncer/pkg/version.GitTagSha=$(git_tag_sha)'"
GOFLAGS=

GOFORMAT := gofmt -l -d -w

# COVERAGE=ON make
ifeq ($(COVERAGE),ON)
GOFLAGS += -cover
endif

.PHONY: flag_coverage
## COVERAGE=ON : Set coverage flag

.PHONY: default
## default: Build ccr_syncer
default: ccr_syncer

.PHONY: build
## build : Build binary
build: ccr_syncer get_binlog ingest_binlog get_meta snapshot_op get_master_token spec_checker rows_parse
Expand All @@ -27,12 +52,12 @@ lint:
.PHONY: fmt
## fmt : Format all code
fmt:
$(V)go fmt ./...
$(V)$(GOFORMAT) .

.PHONY: test
## test : Run test
test:
$(V)go test $(shell go list ./... | grep -v github.com/selectdb/ccr_syncer/cmd | grep -v github.com/selectdb/ccr_syncer/pkg/rpc/kitex_gen/) | grep -F -v '[no test files]'
$(V)go test $(shell go list ./... | grep -v github.com/selectdb/ccr_syncer/cmd | grep -v github.com/selectdb/ccr_syncer/pkg/rpc/kitex_gen/)

.PHONY: help
## help : Print help message
Expand All @@ -42,11 +67,24 @@ help: Makefile

# --------------- ------------------ ---------------
# --------------- User Defined Tasks ---------------
.PHONY: cmd/ccr_syncer

.PHONY: cloc
## cloc : Count lines of code
cloc:
$(V)tokei -C . -e pkg/rpc/kitex_gen -e pkg/rpc/thrift

.PHONY: gen_mock
## gen_mock : Generate mock
gen_mock:
$(V)mockgen -source=pkg/rpc/fe.go -destination=pkg/ccr/fe_mock.go -package=ccr
$(V)mockgen -source=pkg/ccr/metaer.go -destination=pkg/ccr/metaer_mock.go -package=ccr
$(V)mockgen -source=pkg/ccr/metaer_factory.go -destination=pkg/ccr/metaer_factory_mock.go -package=ccr
$(V)mockgen -source=pkg/rpc/rpc_factory.go -destination=pkg/ccr/rpc_factory_mock.go -package=ccr

.PHONY: ccr_syncer
## ccr_syncer : Build ccr_syncer binary
ccr_syncer: bin
$(V)go build -ldflags "-X github.com/selectdb/ccr_syncer/pkg/version.GitTagSha=$(git_tag_sha)" -o bin/ccr_syncer ./cmd/ccr_syncer
$(V)go build ${GOFLAGS} -ldflags ${LDFLAGS} -o bin/ccr_syncer ./cmd/ccr_syncer

.PHONY: get_binlog
## get_binlog : Build get_binlog binary
Expand All @@ -59,9 +97,9 @@ run_get_binlog: get_binlog

.PHONY: sync_thrift
## sync_thrift : Sync thrift
# TODO(Drogon): Add build thrift
sync_thrift:
$(V)rsync -avc $(THRIFT_DIR)/ rpc/thrift/
$(V)rsync -avc $(THRIFT_DIR)/ pkg/rpc/thrift/
$(V)$(MAKE) -C pkg/rpc/ gen_thrift

.PHONY: ingest_binlog
## ingest_binlog : Build ingest_binlog binary
Expand Down Expand Up @@ -98,7 +136,29 @@ get_lag: bin
rows_parse: bin
$(V)go build -o bin/rows_parse ./cmd/rows_parse

.PHONY: thrift_get_meta
## thrift_get_meta : Build thrift_get_meta binary
thrift_get_meta: bin
$(V)go build -o bin/thrift_get_meta ./cmd/thrift_get_meta

.PHONY: metrics
## metrics : Build metrics binary
metrics: bin
$(V)go build -o bin/metrics ./cmd/metrics

.PHONY: todos
## todos : Print all todos
todos:
$(V)grep -rnw . -e "TODO" | grep -v '^./rpc/thrift' | grep -v '^./.git'
$(V)grep -rnw . -e "TODO" | grep -v '^./pkg/rpc/thrift' | grep -v '^./.git'

.PHONY: tarball
## tarball : Archive files and release ccr-syncer-$(version)-$(platform).tar.xz
tarball: default
$(V)mkdir -p tarball/ccr-syncer-$(tarball_suffix)/{bin,db,doc,log}
$(V)cp CHANGELOG.md README.md LICENSE tarball/ccr-syncer-$(tarball_suffix)/
$(V)cp bin/ccr_syncer tarball/ccr-syncer-$(tarball_suffix)/bin/
$(V)cp shell/{enable_db_binlog.sh,start_syncer.sh,stop_syncer.sh} tarball/ccr-syncer-$(tarball_suffix)/bin/
$(V)cp -r doc/* tarball/ccr-syncer-$(tarball_suffix)/doc/
$(V)cd tarball/ && tar cfJ ccr-syncer-$(tarball_suffix).tar.xz ccr-syncer-$(tarball_suffix)
$(V)echo archive: tarball/ccr-syncer-$(tarball_suffix).tar.xz

Empty file modified build.sh
100644 → 100755
Empty file.
Loading