Skip to content

Fix table fun bug - #22

Closed
ouyuanning wants to merge 162 commits into
fengttt:refactor-operators-for-mem-reusedfrom
ouyuanning:fix-table-fun-bug
Closed

ouyuanning wants to merge 162 commits into
fengttt:refactor-operators-for-mem-reusedfrom
ouyuanning:fix-table-fun-bug

Conversation

@ouyuanning

Copy link
Copy Markdown

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #

What this PR does / why we need it:

zengyan1 and others added 30 commits August 9, 2024 08:49
- It is ok to apply filter to mo_tables and mo_database

Approved by: @XuPeng-SH, @daviszhen, @aunjgr
由于backSession不计算stats, 所以导致restore的`insert into select`会被`mo`认为是tp类型的小型插入, 会导致
1. 不走s3
2. 没有开算子内的并行

对于snapshot读上来的数据, 直接返回HugeStats

Approved by: @badboynt1, @ouyuanning, @aunjgr
在读取packet时加入了max_allowed_packet判断
复用load local的read 内存
读取短query时不再使用alloc

mysql对于big packet 超过max_allowed_packet后会抛错断开连接
当前mo会无限接收,直到OOM
修改后行为与mysql一致

Approved by: @daviszhen
support show pitr with range value and unit

Approved by: @heni02, @m-schen
…atrixorigin#17962)

skip view when collect rows and size in cmd `show table status`

Approved by: @daviszhen, @heni02
问题:一个请求中,有多个语句。当第一个语句为begin时,下一条语句会提交事务。
原因:begin语句时,设置的option,执行完后没有立即清理。导致下一条语句执行时,创建了新事务。
修改:option每次复位。

Approved by: @qingxinhome
Support multi test cluster run concurrently

Approved by: @w-zr
修复了一个parallel run构造出来的pipeline上下文结构错误的问题。

Approved by: @XuPeng-SH, @badboynt1, @ouyuanning
Move unnecessary code into error branch.

Approved by: @daviszhen
…18026)

collect table statistics for Ordinary and Materialized

Approved by: @daviszhen
- support grant pub-to-all permission to all accounts
- hide pub info when account has no permission to subscribe
- update table list of mo_pubs and mo_subs when drop table

Approved by: @ouyuanning, @daviszhen, @zhangxu19830126, @heni02
…#18033)

Fix bug: prepare for update with limit clause get error

Approved by: @badboynt1, @aunjgr, @heni02
Optimize create txn

Approved by: @reusee
移除shuffle join probe端一个冗余的merge scope。

Approved by: @ouyuanning
Unref the appender if it is found frozen by checkpoint runner, otherwise flush will be blocked forever

Approved by: @XuPeng-SH
fix the wrong object dropping in rollbacking SoftDelete

Approved by: @XuPeng-SH
to allow defining TypeName on pointer receiver

Approved by: @zhangxu19830126
shuffle join在多cn上的pipeline写的异常杂乱,重构删除一些不必要的pipeline
修复了nilBatchCnt没有序列化导致发送到远端时丢失的bug

Approved by: @m-schen, @aunjgr
…8057)

重新使用sync.Mutex来控制CompileService,
使用channel对高并发的场景很不友好。

Approved by: @badboynt1
## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

issue #

## What this PR does / why we need it:
Wenbin1002 and others added 24 commits August 17, 2024 11:50
add metrics for tombstones transfer
* transfer tombstone count
* transfer tombstone duration
* batch transfer tombstone duration

Approved by: @aptend, @triump2020, @zhangxu19830126, @XuPeng-SH
fix  a bug about isSameCN

Approved by: @ouyuanning
## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

issue #

## What this PR does / why we need it:
Integrated sharding and logtail

Approved by: @triump2020
物理计划侧,pipeline经过重构后,算子流结构由原来的连式结构 更新为树形结构, 因此在调试打印pipeline的代码需要重构,示例如下:
```plpgsql
SQL:SELECT ROUND(SUM(distance), 2) AS total_distance from real_time_position WHERE time_stamp < 1694733800000
Scope 1 (Magic: Merge, mcpu: 1, Receiver: [4])
Pipeline: └── output
└── projection
└── projection
└── merge group
└── merge
PreScopes: {
Scope 1 (Magic: Merge, mcpu: 4, Receiver: [0, 1])
DataSource: cloud_device.real_time_position[time_stamp distance]
Pipeline: └── connect to MergeReceiver 4
└── merge group
└── merge
PreScopes: {
Scope 1 (Magic: Normal, mcpu: 4, Receiver: [])
DataSource: cloud_device.real_time_position[time_stamp distance]
Pipeline: └── connect to MergeReceiver 0
└── group
└── projection
└── filter
└── tablescan
Scope 2 (Magic: Normal, mcpu: 4, Receiver: [])
DataSource: cloud_device.real_time_position[time_stamp distance]
Pipeline: └── connect to MergeReceiver 1
└── group
└── projection
└── filter
└── tablescan
}
}
```

Approved by: @m-schen
)

changed:
1. reload the cpu / mem quota from cgroupv2 if `cpu.max`, `memory.max` is modified
2. fill the metadata.CNService with logpb.CNStore's Resource setting.

no changed:
1. the cn, which running compile, still use its own `#cpu` to setup others cn `#cpu` (which should be `engine.Node.Mcpu`)

Approved by: @zhangxu19830126, @volgariver6, @XuPeng-SH
## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

issue #

## What this PR does / why we need it:
## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

issue #

## What this PR does / why we need it:
为了减少pipeline的打断,需要连接出一些比较长比较复杂的pipeline,导致pipeline执行流程会比之前复杂很多。
为了复用代码,需要让mergeRun和parallelRun可以互相调用,但是需要避免产生死循环

Approved by: @m-schen
## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

issue #

## What this PR does / why we need it:

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
fix a transfer error and add ut to ensure everything goes well

Approved by: @XuPeng-SH
…#18233)

## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

issue #

## What this PR does / why we need it:
@ouyuanning
ouyuanning requested a review from fengttt as a code owner August 20, 2024 06:10
@ouyuanning

Copy link
Copy Markdown
Author

我先合并你的PR,再在合并后的分支修改吧

@ouyuanning ouyuanning closed this Aug 20, 2024
@ouyuanning
ouyuanning deleted the fix-table-fun-bug branch August 30, 2024 08:01
fengttt pushed a commit that referenced this pull request Oct 1, 2026
## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [x] Improvement
- [x] Documentation
- [ ] Feature
- [x] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Refs matrixorigin#28966. This prerequisite does not close the migration issue.

## Review notes

- The owner [superseded the earlier optional-manifest
decision](matrixorigin#28966 (comment)):
Pixi is the sole GPU build provider in the final embedded shape;
CPU-only builds remain Pixi-free.
- [GPU toolchain design v2 at this
head](https://github.com/matrixorigin/matrixone/blob/3ee87c0426bf02c0de57e0fcabea6ce57a0a2b9f/docs/design/sirius-gpu-toolchain.md)
describes the provider, native provenance, and upgrade contract. Sirius
#22 removed its duplicate exporter; draft MO matrixorigin#29203 owns shared-prefix
enforcement and combined runtime packaging.
- MO GPU-only builds retain a small standalone Pixi lock. Combined
MO/Sirius builds use Sirius's single `mo` prefix. The upgrade helper
aligns shared direct constraints from Sirius's locked `mo` manifest and
lets Pixi resolve MO's own lock; it does not copy Sirius's
multi-environment lock.
- `@cpegeric` is a CODEOWNER for `cgo/cuda` and `cgo/cuvs`; CODEOWNER
and independent design review remain required.

Current-head validation at `3ee87c0426`: required MO CI passed,
including UT, Coverage, SCA, native-contract checks, and active multi-CN
BVT lanes. Both GPU Dockerfiles built at this head with rootless Podman;
their final runtime images passed the 333-ELF loader, dangling-link,
driver-stub, and outside-Pixi audit
([evidence](matrixorigin#29254 (comment))).
XuPeng-SH approved this exact design and implementation head. Sirius #22
has merged at `6adc9c0`; the combined MO/Sirius CGo bridge remains
separate draft matrixorigin#29203. CODEOWNER cpegeric's formal change request is
still outstanding. Earlier failed or pending CI runs belong to
superseded heads.

## What this PR does / why we need it:

Make Pixi the sole provider for MatrixOne GPU builds while keeping
CPU-only builds independent of Pixi. Derive CUDA/cuVS inputs from the
activated frozen environment, rebuild native thirdparties when its lock
changes, and package GPU runtime libraries without dangling links,
conflicting basenames, or driver stubs. Remove the system CUDA/Conda
path and separate toolchain manifest, retain both GPU Dockerfiles, and
provide a safe upgrade helper for MO's standalone Pixi lock. Both
Dockerfiles now produce the same 2.67 GB final runtime image, about 70%
smaller than the historically reported 8.97 GB CUDA/Conda image.

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
mergify Bot added a commit that referenced this pull request Nov 20, 2026
…rigin#32853)

## What type of PR is this?

- [ ] API-change
- [x] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Fixes matrixorigin#32842
Fixes matrixorigin#32836

## What this PR does / why we need it:

- Validate exported snapshots before import. Remove a definitively
invalid candidate and try an older export while preserving the TN replay
watermark check. Keep transient read and removal errors retryable
without compacting the Raft log.
- Upgrade to the merged Dragonboat fixes in
[#21](matrixorigin/dragonboat#21) and
[#22](matrixorigin/dragonboat#22). Export worker
failures return an error instead of terminating LogService, and
malformed exported metadata or image headers return an
incomplete-snapshot result instead of panicking.
- Retain an admitted export request across a caller timeout, then
reconcile its final worker result before retrying. After a same-process
replica restart, use Dragonboat's successful restart as confirmation
that the previous worker stopped, clean its abandoned export, and
release the old export fence.
- Rename incomplete final directories to durable `.removing` tombstones
before deletion. Sync the parent directory on both initial cleanup and
retries, so a partial deletion or crash remains recoverable.
- Apply the same tombstone cleanup to invalid-candidate eviction and
post-import cleanup, and return snapshot inventory errors from voting
and nonvoting replica startup.
- Upgrade the pinned upstream Dragonboat module to the merged
[Dragonboat #23](matrixorigin/dragonboat#23)
commit. Export-abort temporary-directory cleanup now reports filesystem
errors to the worker.
- Retry cleanup of already imported snapshots on the next ordinary
truncation tick if the first rename fails, freeing export quota without
re-importing or deleting newer candidates.
- Treat a confirmed missing canonical export directory as already
evicted, so an older valid candidate remains reachable; retain the
inventory item when rename fails but its source still exists.

## Validation

- The published Dragonboat module passes `go mod verify` and matches the
source used for earlier full-package validation.
- Focused corruption, TN replay watermark, failed export commit,
timeout, replica restart, transient read, partial removal, and
parent-sync retry regressions pass.
- The new restart and tombstone-sync regressions each pass 100
race-enabled repetitions. Full `pkg/logservice` tests pass (142.162s),
full package race tests pass (152.021s), and CGo-configured `go vet
./pkg/logservice` passes after merging upstream `main`.
- After the Dragonboat upgrade, `go mod verify` and full
`pkg/logservice` tests passed (127.735s). Dragonboat #23 passed focused
ordinary and race tests.
- After the post-import cleanup retry fix and upstream `main` merge,
full `pkg/logservice` tests pass (132.535s), the
import/corrupt-export/rename-failure regressions pass 10 race-enabled
repetitions, and CGo-configured `go vet ./pkg/logservice` passes.
- After the missing-directory fallback fix, full `pkg/logservice` tests
pass (128.629s), the new fallback and rename controls pass 10
race-enabled repetitions, and `go vet ./pkg/logservice` passes. Focused
regressions also pass after merging the latest upstream `main`; CI is
pending on this head.

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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.