Transaction related DB errors attempt to rollback outside of a transaction and cause a fatal error
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Bắt đầu trong Mysql.php, khoảng dòng 411, và lần theo cách xử lý onException được Queued Tracking sử dụng cho các lỗi cơ sở dữ liệu liên quan đến giao dịch. Kiểm tra cách trạng thái lỗi và rollback được kích hoạt, sau đó xác minh rằng các lỗi có thể thử lại như 1020 không gây ra rollback nghiêm trọng khi không còn giao dịch nào.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
If an innodb_snapshot_isolation or similar transaction-related DB exception occurs during processing, Queued Tracking attempts to roll back but there's no transaction any more - the DB has already aborted the transaction, so this throws a fatal error and causes unwanted side effects such as site-wide cache destruction (https://github.com/matomo-org/matomo/issues/25000).
Starting to process request sets, this can take a while
Error query: Error query: SQLSTATE[HY000]: General error: 1020 Record has changed since last read in table 'matomo_log_visit'; try restarting transaction In query: UPDATE matomo_log_visit SET profilable = ?, visitor_seconds_since_order = ?, visit_exit_idaction_name = ?, visit_exit_idaction_url = ?, visit_total_actions = visit_total_actions + 1 , visit_total_interactions = visit_total_interactions + 1 , visit_total_time = ? WHERE idsite = ? AND idvisit = ? Parameters: array (
0 => 1,
1 => NULL,
2 => 200127,
3 => 200128,
4 => 952,
5 => 1,
6 => 1234653346,
) In query: UPDATE matomo_log_visit SET profilable = ?, visitor_seconds_since_order = ?, visit_exit_idaction_name = ?, visit_exit_idaction_url = ?, visit_total_actions = visit_total_actions + 1 , visit_total_interactions = visit_total_interactions + 1 , visit_total_time = ? WHERE idsite = ? AND idvisit = ? Parameters: array (
0 => 1,
1 => NULL,
2 => 200127,
3 => 200128,
4 => 952,
5 => 1,
6 => 1234653346,
)
In Mysql.php line 411:
There is no active transaction
It would be good to add 1020 to onException so it at least gets retried (MariaDB LTS has innodb_snapshot_isolation on by default), but attempting to rollback outside of the transaction is still fatal - this is already the case with InnoDB deadlocks and other transaction related errors. I would suggest catching a rollback with no active transaction error and make it a no-op as the current logic always sets $this->hasError = true even if it's a retriable transaction error, so rollbacks are triggered regardless.
- Ngôn ngữ chính
- PHP
- Star
- 87
- Fork
- 41
- Merge trung bình
- 3 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của matomo-org/plugin-QueuedTracking
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
matomo-org/plugin-QueuedTracking#324 · 1 reaction ·
-
QueuedTracking intercepts bulk JSON requests it cannot process, silently dropping all eventsĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
matomo-org/plugin-QueuedTracking#320 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 50/100
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
-
enhancement triaged
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 43/100
matomo-org/plugin-QueuedTracking#296 · 2 bình luận ·
Tất cả issue của matomo-org/plugin-QueuedTracking
Issue tương tự
-
sync-en
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
UX
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ProfessionalWiki/NeoWiki#1573 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100