chore(data-structures): low-priority follow-ups from a data-structure review
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Start with lib/core/database/connection_pool_lock.dart and add tests for concurrent callers, separate keys, and synchronous or asynchronous failures; the issue says the class currently has no tests. Check the three pool implementations for PostgreSQL, MySQL, and SQLite when judging whether re-entrancy matters. Done means the tests establish the intended behavior and _lock is removed or its purpose is documented; the boolean-column and interning ideas are explicitly conditional.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Findings from a review of the data structures, checked against dev. The two that pay off are in #1682 (Redis folder key count, groupings number parsing). What is left is small; each item says whether it is worth doing.
1. PoolEntryLock._lock is never active (worth a test first)
lib/core/database/connection_pool_lock.dart: createIfAbsent sets _lock, runs a block with no await, and clears it in finally in the same turn, so the while (_lock != null) await _lock loop never waits. De-duplication really comes from _pending[key]. The one thing the lock changes is re-entrancy: a call to createIfAbsent made from inside create() waits instead of running at once. The class has no tests and three pools use it (PostgreSQL, MySQL, SQLite).
- Add tests: two callers, one key, one
create(); two keys in parallel; a failingcreate()clears the entry;create()that throws synchronously. - Then drop
_lock(or keep it and say why in the doc comment).
2. BooleanCompactColumn (probably not worth it)
Boolean columns are stored as 0/1 in Int64List (8 bytes per row, about 790 KB per column at 100k rows more than a bit array). A packed column touches formatting, sort, type detection and export. Only do this if a profile shows boolean columns dominating the heap.
3. StringInternPool does not evict
When maxEntries (4096) is reached, new strings are simply not interned. That is the right trade for a bounded pool; an LRU would add bookkeeping to a hot path. Only revisit if results with more than 4096 distinct short values are common.
Considered and rejected
MetricHistory.recordusesremoveRange(0, 1)on a list of at most 120 samples every 5 s: a copy of 120 references. A ring buffer would be more code for no visible gain.GenericCompactColumn.formatterand isolates: noted on #1549, where the isolate hand-off is in scope.
- Ngôn ngữ chính
- Dart
- Star
- 23
- Fork
- 1
- Merge trung bình
- 32 phút
- Pull request đã merge (30 ngày)
- 537
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọ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 QueryaHub/Querya-Desktop
-
enhancement ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
QueryaHub/Querya-Desktop#1689 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ui(dialogs): make destructive query and DML preview dialogs adaptive and prevent table name overflowĐang mởbug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
QueryaHub/Querya-Desktop#1642 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug error-handling settings
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
QueryaHub/Querya-Desktop#1637 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
QueryaHub/Querya-Desktop#1636 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement marketplace
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
QueryaHub/Querya-Desktop#1635 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của QueryaHub/Querya-Desktop
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
jhomlala/betterplayer#1609 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[FR] 缓存键放置在外面Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
bggRGjQaUbCoE/PiliPlus#3310 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
package:code_builder type-bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
type:feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[material_ui] CalendarDatePicker day numbers are cut off with large text scale on narrow screensĐang mở
Độ 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 1 ngày