instance_id
stringlengths
10
65
repo
stringlengths
5
59
pr_number
int64
1
313k
task_type
stringclasses
1 value
base_commit
stringlengths
40
40
review_commit
stringlengths
40
40
title
stringlengths
2
282
body
stringlengths
7
3k
patch
stringlengths
202
204k
n_defects
int64
1
72
n_supported
int64
1
65
n_major
int64
0
32
defects
stringlengths
140
18.8k
certifier_count
int64
synthetichealth__synthea__788
synthetichealth/synthea
788
defect
b54b067e6af77b961ca30adcdf5c10d0f875cdb0
87232d983f6672a7f1d8a7d17df9a74be7c2e9d6
Support different distribution types for random variables in a new GMF format
This change supports a new `distribution` property in `Delay`, `Observation`, `Procedure`, `SetAttribute`, `Symptom` and `VitalSign` states. For example, an `Observation` of LDL Cholesterol with a Gaussian distribution of results would be: ```json "Observation" : { "type" : "Observation", "cat...
diff --git a/src/main/java/org/mitre/synthea/engine/Distribution.java b/src/main/java/org/mitre/synthea/engine/Distribution.java new file mode 100644 index 0000000000..7d243ea4ea --- /dev/null +++ b/src/main/java/org/mitre/synthea/engine/Distribution.java @@ -0,0 +1,60 @@ +package org.mitre.synthea.engine; + +import ja...
5
3
0
[{"id": "G0", "claim": "Would it simplify things to upgrade GMF 1.0 states to the latest format at module initialization time instead of checking isLegacyGmf on every process and falling back to legacy behavior?", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "clai...
null
synthetichealth__synthea__845
synthetichealth/synthea
845
defect
fffae0e3c44c0448634f3993acbd1d906728d0ce
1271d7f4dd964a4bfadeeee286873261f070c4af
Include/Exclude for CSV exporter files
Adds configuration options for included and excluded files in the CSV exporter. Since many use cases don't require every single CSV file, we can save some space and computing time by not exporting them in the first place. (I'm looking at you, observations.csv...) If you specify a list of files in `exporter.csv.inclu...
diff --git a/src/main/java/org/mitre/synthea/export/CSVExporter.java b/src/main/java/org/mitre/synthea/export/CSVExporter.java index 5e89207800..ef3d882fb0 100644 --- a/src/main/java/org/mitre/synthea/export/CSVExporter.java +++ b/src/main/java/org/mitre/synthea/export/CSVExporter.java @@ -15,12 +15,16 @@ import java....
3
3
1
[{"id": "G0", "claim": "NUMBER_OF_FILES is only used by the test suite, so the constant should be moved from CSVExporter to CSVExporterTest.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The filename normalization code (trim, lowercase, add .cs...
null
synthetichealth__synthea__849
synthetichealth/synthea
849
defect
fffae0e3c44c0448634f3993acbd1d906728d0ce
9092954dbd6e59fdda7ecd3e699df0a6b3c30a78
Even more assorted bugfixes
This PR intends to fix a few issues, mostly in unit tests, relating to memory usage and weird exceptions. This gets pretty involved so please don't hesitate to ask if the fixes aren't clear. Note: when looking at the diff I highly recommend using "ignore whitespace changes" as the 3 FHIR exporter test diffs are most...
diff --git a/src/main/java/org/mitre/synthea/engine/State.java b/src/main/java/org/mitre/synthea/engine/State.java index 80fe6657ab..09728ef5d1 100644 --- a/src/main/java/org/mitre/synthea/engine/State.java +++ b/src/main/java/org/mitre/synthea/engine/State.java @@ -121,14 +121,17 @@ public static State build(Module mo...
3
1
0
[{"id": "G0", "claim": "For consistency with the original's commented-out line, SetAttribute.clone() should set threadExpProcessor to null.", "category": "correctness", "verdict": "opposed", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "If nulling threadExpProcessor in clone() is valid, the same tr...
null
synthetichealth__synthea__879
synthetichealth/synthea
879
defect
079b1eb099c48a4db7edb8911dffff95c5cede02
3cb2213142f6b6953533b0b5593e1be7562ca27e
Odds and Ends
This PR includes a mishmash of various fixes and tweaks pulled from multiple active working branches, in order to reduce the changes left on those branches to what's really important, and ensure these fixes are available throughout. Where possible, these commits were cherry-picked from other branches to help git figur...
diff --git a/src/main/java/Graphviz.java b/src/main/java/Graphviz.java index 94e4eea7ef..7ee0915760 100644 --- a/src/main/java/Graphviz.java +++ b/src/main/java/Graphviz.java @@ -655,7 +655,7 @@ private static String logicDetails(JsonObject logic) { + valueString + NEWLINE; case "Vital Sign": ...
2
1
0
[{"id": "G0", "claim": "The new appendNumbersToNames config flag in Provider should probably just live inside the new Names class.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The metabolic syndrome module refactoring should probably be a separate pull...
null
synthetichealth__synthea__881
synthetichealth/synthea
881
defect
079b1eb099c48a4db7edb8911dffff95c5cede02
a21f46065f8738ccc1430d51fae2d19f68e3dd14
Add ability to select patients to keep/export using a GMF module
This PR introduces the ability to specify a special GMF module that determines criteria for a patient to be exported. Because the GMF doesn't have the concept of "returning a value" explicitly, this takes the approach of using a named state to determine whether a patient record should be kept or not. (I don't love m...
diff --git a/src/main/java/App.java b/src/main/java/App.java index c1181ca592..a5cf525048 100644 --- a/src/main/java/App.java +++ b/src/main/java/App.java @@ -32,6 +32,7 @@ public static void usage() { System.out.println(" [-u updatedPopulationSnapshotPath]"); System.out.println(" [-t updateTi...
5
4
3
[{"id": "G0", "claim": "Introduce a class for the result of a patient simulation (e.g. SimulationResult holding person, finish time, aliveness and provider count), move patientMeetsCriteria into it, and stop keeping settings like onlyDeadPatients as Generator fields.", "category": "design", "verdict": "uncertain", "pri...
null
synthetichealth__synthea__947
synthetichealth/synthea
947
defect
a3482c856d30410e438047845796095a827cca41
c320f77b3da6c3f07bf3cf757d38b55245bda862
IHS Providers
This PR implements changes and additions for providers related to the [Indian Health Service](https://www.ihs.gov). * There is now a new significant value for `Provider.type` of `IHS Facility`. Upon merging this PR, I'll update the associated information in the wiki. * IHS Hospitals were pulled out of the main `hos...
diff --git a/src/main/java/org/mitre/synthea/world/agents/Person.java b/src/main/java/org/mitre/synthea/world/agents/Person.java index bb28b59952..695632f891 100644 --- a/src/main/java/org/mitre/synthea/world/agents/Person.java +++ b/src/main/java/org/mitre/synthea/world/agents/Person.java @@ -96,6 +96,7 @@ public clas...
3
3
2
[{"id": "G0", "claim": "The new nearest-provider logic picks the first provider after sorting instead of selecting randomly among providers at the same (minimal) distance, which the reviewers say significantly reduces the variety of providers utilized, and dehall asks to reintroduce the randomness with a single call to...
null
synthetichealth__synthea__962
synthetichealth/synthea
962
defect
2b847f5625327f523dabe29aa94fdf6d1e65a6e0
a6bc77fa366e256381b1cfa58d97228afeea3787
JSON Export
Allows Synthea `Person` objects to be exported as JSON. Documentation on [JSON Export page of the Synthea wiki](https://github.com/synthetichealth/synthea/wiki/JSON-Export).
diff --git a/src/main/java/org/mitre/synthea/engine/ExpressedConditionRecord.java b/src/main/java/org/mitre/synthea/engine/ExpressedConditionRecord.java index 103742e635..e17a1e4fd0 100644 --- a/src/main/java/org/mitre/synthea/engine/ExpressedConditionRecord.java +++ b/src/main/java/org/mitre/synthea/engine/ExpressedCo...
5
5
1
[{"id": "G0", "claim": "The new exporter.json properties should be moved up or down so they do not split the block of CSV-specific properties in synthea.properties.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Pretty printing should be enabled...
null
synthetichealth__synthea__965
synthetichealth/synthea
965
defect
e801d58d05701e9f274055d5a3a14adbe3e65373
f70058249c6a943b547c0dcac4836281514f9f01
Allow ISO formatted dates in look up table transitions
Look up table transitions previously allowed for decisions to be made on the time in the simulation. The way that this works is that time ranges can be defined using milliseconds since the epoch. This works, but is not great for human readability. This PR preserves that capability, but also allows for date ranges to...
diff --git a/src/main/java/org/mitre/synthea/engine/Transition.java b/src/main/java/org/mitre/synthea/engine/Transition.java index 40dfbb76dc..5798c26cd1 100644 --- a/src/main/java/org/mitre/synthea/engine/Transition.java +++ b/src/main/java/org/mitre/synthea/engine/Transition.java @@ -221,17 +221,7 @@ private void loa...
1
1
1
[{"id": "G0", "claim": "The ISO-date upper bound of parseDateRange should be the end of the day so the range is fully inclusive rather than inclusive-of-start/exclusive-of-end, or at least the Javadoc should specify whether the bounds are inclusive or exclusive.", "category": "design", "verdict": "supported", "priority...
null
synthetichealth__synthea__975
synthetichealth/synthea
975
defect
259f39ef1c41b97da9f4dc243e1002380e4ebc9d
bd78881c9f1943b9af56c23bc0a097e486981699
BFD FIPS Codes
Adds FIPS county codes to the BFD Beneficiary file. Also fixes an unrelated unit test where the cost adjustment factor was not properly set (which will cause random unit test failures).
diff --git a/src/main/java/org/mitre/synthea/export/BB2RIFExporter.java b/src/main/java/org/mitre/synthea/export/BB2RIFExporter.java index dcf3474f67..acdeac39fb 100644 --- a/src/main/java/org/mitre/synthea/export/BB2RIFExporter.java +++ b/src/main/java/org/mitre/synthea/export/BB2RIFExporter.java @@ -384,6 +384,10 @@ ...
1
1
0
[{"id": "G0", "claim": "The outer `if (zipcode.length() > 3)` wrapping the `zipcode.length() == 4` check in buildFipsTable isn't needed — pull out the nested if.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
synthetichealth__synthea__993
synthetichealth/synthea
993
defect
30ba8cb16860c80e2f23f99247fdba9d303a0983
e368dce627cbd4fd8cf8cb9bff885ddc746cac01
Additional BFD RIF Beneficiary Fields
Additional field support for the BFD RIF exporter: 1. Implement RDS_*_IND fields and fix RDS_MO_CNT field to match 2. Implement RTI_RACE_CD based on BENE_RACE_CD - surname based algorithm not yet implemented
diff --git a/src/main/java/org/mitre/synthea/export/BB2RIFExporter.java b/src/main/java/org/mitre/synthea/export/BB2RIFExporter.java index 53fe92ee5f..2c88529f1c 100644 --- a/src/main/java/org/mitre/synthea/export/BB2RIFExporter.java +++ b/src/main/java/org/mitre/synthea/export/BB2RIFExporter.java @@ -423,9 +423,11 @@ ...
1
1
0
[{"id": "G0", "claim": "The Javadoc on PartCContractHistory.getRandomContractID says a contract ID is returned 70% of the time and null 30% of the time, which does not match the code's 42% chance of returning null.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
syoyo__tinyexr__240
syoyo/tinyexr
240
defect
3ffe5f9d5e673e6e8c378d59b306b2824993e705
408aa725490301a81d97e66505054e5a3c14b159
Fix heap-buffer-overflow in B44/B44A DecodePixelData with mixed channel types
B44/B44A decoding crashes with an out-of-bounds read when an EXR contains channels of mixed pixel types (e.g. HALF + FLOAT). Nine independent bugs cause this. ## Bugs Fixed - **Wrong `ch_offset` in `DecodePixelData`**: offset was computed as `c * width * num_lines * ch_bytes`, using the *current* channel's byte size ...
diff --git a/.gitignore b/.gitignore index 70595f45..5f1c54b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ output.exr test_tinyexr +*.o +test/unit/tester +test/unit/tester-v3 +test/unit/*.exr diff --git a/test/unit/tester.cc b/test/unit/tester.cc index 09defebd..08e115f6 100644 --- a/test/unit/tester.cc +...
5
4
3
[{"id": "G0", "claim": "Add a regression test for the B44 mixed channel type heap-buffer-overflow fix.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G2", "claim": "The new B44 encoder sequentialization feeds byte-swapped little-endian HALF bytes from buf into Compres...
null
syrusakbary__aiodataloader__25
syrusakbary/aiodataloader
25
defect
30ce54ef3eb3b86f08b0dc671203232a11c5f197
c3690c616323ee177651d01f7e9a6a3e64dd4d68
Type DataLoader
Add types to the DataLoader. The main drive was to get `batch_load_fn` to allow the type engine to infer the type of `load`, and this accomplishes that. Two unfortunate side-effects: One is that I don't know how to type it to accept any Sequence type (or, at the bare minimum, `Tuple | List`), because they're general...
diff --git a/.travis.yml b/.travis.yml index c5155e3..b0fd918 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: python sudo: false python: -- 3.5 - 3.6 - 3.7 - 3.8 diff --git a/aiodataloader.py b/aiodataloader.py index 0cd6684..3cfd56a 100644 --- a/aiodataloader.py +++ b/aiodataloader.py @@ -1,...
23
16
7
[{"id": "G0", "claim": "The pull request should not carry reformatting and other changes not required to add typing (quote-style changes, moved __version__, reshuffled imports) so the change stays easy to follow and trace.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}...
null
syslog-ng__syslog-ng__4137
syslog-ng/syslog-ng
4,137
defect
79a7d9bbda11b5dd4f1eb11d0aa04576abefdd76
1ce36bced7c051d5261ad787a3788b433e2ce1a1
http driver compression options
<!-- Thank you for contributing to syslog-ng. Please make sure you: - Read our Contribution guideline: https://github.com/syslog-ng/syslog-ng/blob/master/CONTRIBUTING.md - Checked that tests pass (including stylechecks: `make style-check`) - Wrote a news file, if applicable: https://github.com/syslog-ng/syslog-ng/t...
diff --git a/modules/http/CMakeLists.txt b/modules/http/CMakeLists.txt index dd7fa800b0a..727ac5f1c27 100644 --- a/modules/http/CMakeLists.txt +++ b/modules/http/CMakeLists.txt @@ -26,6 +26,8 @@ set(HTTP_DESTINATION_SOURCES http-signals.h autodetect-ca-location.h autodetect-ca-location.c + http-curl-c...
10
8
2
[{"id": "G0", "claim": "The check/match/convert logic between compression enum values and their string representations, including the build-support check, should live inside the compression module behind an API like compression_type_from_str()/compression_type_to_str(), instead of exposing curl_compression_types and re...
null
syslog-ng__syslog-ng__4143
syslog-ng/syslog-ng
4,143
defect
7ee50520fcdf691adfaa5e3acfc17b722d5865c8
34a6d6cb60c8281b7199f16709ef6c44c58ad2fa
syslog-ng/main: resolve path templates in --help output
This one fixes #4138, which was forwarded by @mochrul from Debian ticket https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=962839
diff --git a/syslog-ng/main.c b/syslog-ng/main.c index a4f5c8f46a1..a8929c065c1 100644 --- a/syslog-ng/main.c +++ b/syslog-ng/main.c @@ -87,6 +87,17 @@ static GOptionEntry syslogng_options[] = { NULL }, }; + +static void +__resolve_paths_in_help_texts(void) +{ + for (GOptionEntry *oe = syslogng_options; oe->long...
3
2
0
[{"id": "G0", "claim": "No news file has been detected for this pull request; one should be written, if applicable.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The build of this pull request failed.", "category": "correctness", "verdict": "unce...
null
syslog-ng__syslog-ng__4188
syslog-ng/syslog-ng
4,188
defect
439b780712c0892e68913ac03fc56cbec8cba603
3955e0c3746966541dc69c38cde4a3d740e89cc4
Python log dest and parser base classes
This is the first chunk of #4165 to add base classes for Python based LogDestination and LogParser classes.
diff --git a/modules/python/python-helpers.c b/modules/python/python-helpers.c index df6b2abea3f..88ca4fe37be 100644 --- a/modules/python/python-helpers.c +++ b/modules/python/python-helpers.c @@ -376,6 +376,18 @@ _py_perform_imports(GList *imports) g_list_foreach(imports, _foreach_import, NULL); } +const gchar *...
1
1
1
[{"id": "G0", "claim": "PyObject_Repr() can fail and return NULL, and py_bytes_or_string_to_string() is not null-safe, so _py_object_repr() should add a null-check on the repr result.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
syslog-ng__syslog-ng__4271
syslog-ng/syslog-ng
4,271
defect
8d270c572d32ed4f8e708c1760d82eea01ac4c0e
b2c8ca6292af4667a735f676d87edbf3f1e8a2db
Fix macOS CI
Based on https://github.com/Homebrew/homebrew-core/blob/master/Formula/syslog-ng.rb This fixes the macOS CI (the image seems to be updated and contains a broken net-snmp installation).
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3c3b1971372..93c80f56dff 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -44,7 +44,7 @@ jobs: " gh_export PYTHONUSERBASE PKG_CONFIG_PATH THREADS CONFIGURE_FLAGS - gh_path "/usr/loc...
1
1
1
[{"id": "G0", "claim": "The macOS workflow should use `brew --prefix` everywhere (e.g. export HOMEBREW_PREFIX=$(brew --prefix)) instead of hard-coding /usr/local/opt/... paths, especially on OS versions where brew is keg-only.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}...
null
syslog-ng__syslog-ng__4365
syslog-ng/syslog-ng
4,365
defect
40e633f8a332152f1a7f471f7f7512c81e461aff
1a2ec936d6d06f95d8d8b05e53272704711c9a62
add ebpf() plugin and reuseport randomization
`ebpf()` plugin and udp packet balancer: a new ebpf() plugin was added which leverages the kernel's eBPF infrastructure to improve performance and scalability of syslog-ng. The first ebpf based solution improves performance when a single (or very few) senders generate most of the inbound UDP traffic that syslog-ng...
diff --git a/configure.ac b/configure.ac index 147b00d1ca7..669a1842e66 100644 --- a/configure.ac +++ b/configure.ac @@ -247,6 +247,10 @@ AC_ARG_ENABLE(linux-caps, [ --enable-linux-caps Enable support for managing Linux capabilities (default: auto)] ,,enable_linux_caps="auto") +AC_A...
7
7
3
[{"id": "G0", "claim": "The NEWS example should use the boolean form so-reuseport(yes) instead of so-reuseport(1), to promote the yesno option's canonical spelling.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "configure.ac should look for bpftoo...
null
syslog-ng__syslog-ng__4377
syslog-ng/syslog-ng
4,377
defect
61d8189c1ba4290279e110f5aaef2bf0c7765d72
ee599d0f08ff9c3b9aab04455b1e766e2d7a4dca
qdisk: account for overwriting in get_empty_space()
No news file needed. Related PR #4356. Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
diff --git a/.mailmap b/.mailmap index fd1167d9131..fbe369db498 100644 --- a/.mailmap +++ b/.mailmap @@ -14,6 +14,8 @@ Attila Szakacs <attila.szakacs@balabit.com> <attila.szakacs@quest.com> Attila Szakacs <attila.szakacs@balabit.com> <attila.szakacs@balabit.com> Attila Szakacs <attila.szakacs@balabit.com> <attila.sza...
2
2
1
[{"id": "G0", "claim": "A (unit) test should be written for the rewritten qdisk_get_empty_space() overwriting logic.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The final else branch of qdisk_get_empty_space() (write and backlog head on different sid...
null
syslog-ng__syslog-ng__4378
syslog-ng/syslog-ng
4,378
defect
197f8dfd00a7c510c0bb6692264914de000a77c0
19a518f9d31d51e2703cbf842c67ed5827b6af7a
stats: add StatsClusterKeyBuilder
This will be useful for places, where multiple layers add labels on the call chain. No news file needed. Related PR #4356. Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
diff --git a/lib/stats/CMakeLists.txt b/lib/stats/CMakeLists.txt index 59967b48c31..2acedabcbf2 100644 --- a/lib/stats/CMakeLists.txt +++ b/lib/stats/CMakeLists.txt @@ -13,6 +13,7 @@ set(STATS_HEADERS stats/stats-query-commands.h stats/stats-cluster-logpipe.h stats/stats-cluster-single.h + stats/stats...
4
3
2
[{"id": "G0", "claim": "The labels are sorted on every build, and the reviewer asks why that sorting is needed at all.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The build functions should allocate and return the key themselves (returning StatsCluste...
null
syslog-ng__syslog-ng__4380
syslog-ng/syslog-ng
4,380
defect
61d8189c1ba4290279e110f5aaef2bf0c7765d72
f96b5e4b8478c846a2729ebe22504db09e2cb31b
qdisk: preallocate qdisk file after creating header
Related comment: https://github.com/syslog-ng/syslog-ng/pull/4335#discussion_r1135321974 No news file needed. Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
diff --git a/modules/diskq/qdisk.c b/modules/diskq/qdisk.c index 708381ec078..3ef17233bbf 100644 --- a/modules/diskq/qdisk.c +++ b/modules/diskq/qdisk.c @@ -80,7 +80,7 @@ struct _QDisk gchar *filename; const gchar *file_id; gint fd; - gint64 file_size; + gint64 cached_file_size; QDiskFileHeader *hdr; D...
1
1
1
[{"id": "G0", "claim": "The declaration `off_t pos = 0;` in `_compat_preallocate()` was accidentally removed by the pull request, leaving `pos` undeclared where the function still uses it.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}]
null
syslog-ng__syslog-ng__4383
syslog-ng/syslog-ng
4,383
defect
00e8efe1f343a5414a26aba561d25275998ffd9e
96c0320a7e3c6d2039804a0977e40ee49da65796
qdisk: set filename sooner
This PR is a preparation step for #4356. There, we will need to know the filename when creating a `LogQueueDisk` instance in order to properly setup the `StatsClusterKey` for the metrics. No news file needed. Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
diff --git a/modules/diskq/qdisk.c b/modules/diskq/qdisk.c index 54289111b55..d319dbd2c46 100644 --- a/modules/diskq/qdisk.c +++ b/modules/diskq/qdisk.c @@ -235,47 +235,47 @@ _release_dirlock(gint fd) g_mutex_unlock(&filename_lock); } -static gboolean -_next_filename(QDisk *self, gchar *filename, gsize filename_l...
2
2
2
[{"id": "G0", "claim": "When next_filename is NULL in qdisk_start(), the function should report an error and return FALSE instead of falling through to return TRUE as success.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "A unit test case should be...
null
syslog-ng__syslog-ng__4389
syslog-ng/syslog-ng
4,389
defect
00e8efe1f343a5414a26aba561d25275998ffd9e
00c1836238167a2e35c774e904c529a67aa528d7
logqueue: register stats counters in ctor
`LogQueue` currently only has driver level stats counters, the queue level counters are only atomic counters, but do not have `StatsCounterItems` assigned to them. I am planning to introduce queue level stats counters, which cannot be done because of the following reasons: * The counters of `LogQueue`'s (currenlt...
diff --git a/lib/stats/stats-cluster-key-builder.c b/lib/stats/stats-cluster-key-builder.c index 56807b28cb0..ae6b33a60d4 100644 --- a/lib/stats/stats-cluster-key-builder.c +++ b/lib/stats/stats-cluster-key-builder.c @@ -170,12 +170,16 @@ StatsClusterKey * stats_cluster_key_builder_build_single(const StatsClusterKeyBu...
1
1
1
[{"id": "G0", "claim": "In legacy-only cases, key_legacy_set() should be used instead of add_legacy_alias() when building the StatsClusterKey.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
syslog-ng__syslog-ng__4392
syslog-ng/syslog-ng
4,392
defect
95683d5bde7bdc323f3665dbba3dfb6f32b6b4f3
4dc1bb9361f51314651a6bb25a6d8b8dbf3bedb2
logqueue: add queue level metrics
This PR introduces queue level metrics: * The corresponding driver is identified with the "id" and "driver_instance" labels. * Available counters are "memory_usage_bytes" and "events". * Memory queue metrics are available with "syslogng_memory_queue_" prefix, `disk-buffer` metrics are available with "sysl...
diff --git a/lib/driver.c b/lib/driver.c index cb9382b659e..e040af3a71d 100644 --- a/lib/driver.c +++ b/lib/driver.c @@ -243,7 +243,8 @@ log_src_driver_free(LogPipe *s) /* LogDestDriver */ static LogQueue * -_create_memory_queue(LogDestDriver *self, const gchar *persist_name) +_create_memory_queue(LogDestDriver *se...
1
1
0
[{"id": "G0", "claim": "Optionally use a buffer on the stack (or scratch_buffers) instead of heap-allocating the small worker-index string built with g_strdup_printf.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
syslog-ng__syslog-ng__4411
syslog-ng/syslog-ng
4,411
defect
de479892e736322cb8261da926b5e5882209646c
f3b3483795d3e2e4460bfe54e8fab3a9cda5e9f4
TCP connection metrics and minor improvements
New metrics `network()`, `syslog()`: TCP connection metrics ``` syslogng_socket_connections{id="tcp_src#0",driver_instance="afsocket_sd.(stream,AF_INET(0.0.0.0:5555))",direction="input"} 3 syslogng_socket_max_connections{id="tcp_src#0",driver_instance="afsocket_sd.(stream,AF_INET(0.0.0.0:5555))",direction="inpu...
diff --git a/lib/afinter.c b/lib/afinter.c index 0cb08949545..25440435f51 100644 --- a/lib/afinter.c +++ b/lib/afinter.c @@ -38,6 +38,7 @@ static GQueue *internal_msg_queue; static AFInterSource *current_internal_source; static StatsCounterItem *internal_queue_length; static StatsCounterItem *internal_queue_dropped;...
2
1
1
[{"id": "G0", "claim": "The internal queue counter shown in the healthcheck output is confusing because it is not calculated into the healthcheck's result, so functions like get_queue_length()/is_queue_filled() should be exposed from afinter and the queue state included in the health calculation.", "category": "design"...
null
syslog-ng__syslog-ng__4412
syslog-ng/syslog-ng
4,412
defect
de479892e736322cb8261da926b5e5882209646c
63f59b0be59a0eecbb8c99b629a6b9ed91a0d774
tls: set client CA list based on the ca-dir() and ca-file() options
Filling the `certificate_authorities` field of the certificate request, to help clients choose certs to use. From https://www.ietf.org/rfc/rfc5246.txt 7.4.4: > certificate_authorities > A list of the distinguished names [X501] of acceptable > certificate_authorities, represented in DER-encoded format....
diff --git a/cmake/openssl_functions.cmake b/cmake/openssl_functions.cmake index 319dcc2e23b..5afbd7f12fd 100644 --- a/cmake/openssl_functions.cmake +++ b/cmake/openssl_functions.cmake @@ -44,7 +44,9 @@ function (openssl_set_defines) SSL_CTX_set_num_tickets SSL_CTX_set_ciphersuites SSL_CTX_set1_sigalgs_l...
4
3
2
[{"id": "G0", "claim": "Setting the client CA list only has an effect on the server side (TM_SERVER), so the new _set_client_ca_list() call in tls_context_setup_context() should be guarded by a mode check.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim...
null
syslog-ng__syslog-ng__4415
syslog-ng/syslog-ng
4,415
defect
725cfbfd4a968bb9c2b00fa7f3c6ccd232487dc6
a552a22f0a269ec771369525e6350907fa944864
format-json: fix RFC8259 number violation
RFC8259 does not allow '+' sign and leading zeros in numbers, but these and leading spaces are allowed by type_cast_to_number(). Because syslog-ng should always store the original representation (normalizing the stored value would break other functionality), normalization/sanitization/etc. should be done in formatte...
diff --git a/modules/json/format-json.c b/modules/json/format-json.c index bef2d4e012f..8f6698e76ea 100644 --- a/modules/json/format-json.c +++ b/modules/json/format-json.c @@ -234,6 +234,24 @@ tf_json_append_list(const gchar *name, const gchar *value, gsize value_len, g_string_append_c(state->buffer, ']'); } +/*...
2
1
0
[{"id": "G0", "claim": "tf_json_append_int should not format the integer with g_snprintf because sprintf is really slow; a faster approach, such as the existing implementation in str-format.c, should be used instead.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "...
null
syslog-ng__syslog-ng__4441
syslog-ng/syslog-ng
4,441
defect
b1842f8e8620634992f2cb73ef001c1c2e7025de
48299c44e6ef5cbc9d7d4e8ecdb09ee45d341abf
Retrieve packet timestamp from the kernel
This PR adds support for SO_TIMESTAMPNS getsockopt to retrieve an accurate timestamp from the kernel to retain packet ordering.
diff --git a/lib/transport/transport-socket.c b/lib/transport/transport-socket.c index 844379181c8..0cb7c749f8e 100644 --- a/lib/transport/transport-socket.c +++ b/lib/transport/transport-socket.c @@ -86,12 +86,53 @@ _determine_proto(gint fd, gint address_family) return result; } +void +log_transport_socket_parse...
2
2
1
[{"id": "G0", "claim": "The signature of _extract_from_msghdr_method suggests it might change rc, which it does not; the reviewer asks to move the rc > 0 check to the call site, make the function void, and drop rc from its arguments.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced...
null
syslog-ng__syslog-ng__4476
syslog-ng/syslog-ng
4,476
defect
cc7625bbcb18db1acc64168869786fae5090523b
53374eba8eaff69425da8ac2c1ab4d80d1481941
Loggen performance improvements
This is split off from #3966, I've discovered that loggen was only capable of doing ~250k msg/sec per thread, which is not enough for the latest round of scalability improvements in syslog-ng.
diff --git a/news/feature-4476.md b/news/feature-4476.md new file mode 100644 index 00000000000..8edef3c3e5d --- /dev/null +++ b/news/feature-4476.md @@ -0,0 +1,2 @@ +`loggen`: improve loggen performance for synthetic workloads, so we can test +up to 650k msg/sec on my AMD Ryzen 7 Pro 6850U CPU. diff --git a/tests/logg...
2
2
2
[{"id": "G0", "claim": "The static timestamp globals (ts_formatted, stamp, len) added in generate_log_line() are written by multiple threads, so the race can produce invalid timestamps; use TLS or cache the timestamp on the caller side.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "in...
null
syslog-ng__syslog-ng__4487
syslog-ng/syslog-ng
4,487
defect
272c6569ef9b3b6b6389c094017f836bc60de6a6
431bc1bf03967553e04d765dd0132ddf27e07ce5
python: multiple `options` do not merge
Fix for #4482 Signed-off-by: Hofi <hofione@gmail.com>
diff --git a/modules/python/python-dest.c b/modules/python/python-dest.c index 24a38aae89a..f8c65708620 100644 --- a/modules/python/python-dest.c +++ b/modules/python/python-dest.c @@ -90,8 +90,8 @@ python_dd_set_options(LogDriver *d, PythonOptions *options) { PythonDestDriver *self = (PythonDestDriver *)d; - py...
1
1
1
[{"id": "G0", "claim": "The pull request should add a simple unit test covering the new options-merging behaviour.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
syslog-ng__syslog-ng__4538
syslog-ng/syslog-ng
4,538
defect
a5f581f541e9ee441950ea064339bc0fb28486ee
740cbd280c3a8f8c8088d3e68b8ef0ab470ce0f5
Counter underflow fixes
<!-- Thank you for contributing to syslog-ng. Please make sure you: - Read our Contribution guideline: https://github.com/syslog-ng/syslog-ng/blob/master/CONTRIBUTING.md - Checked that tests pass (including stylechecks: `make style-check`) - Wrote a news file, if applicable: https://github.com/syslog-ng/syslog-ng/t...
diff --git a/lib/logsource.h b/lib/logsource.h index 3953eae93ca..35b3d9c197f 100644 --- a/lib/logsource.h +++ b/lib/logsource.h @@ -33,7 +33,7 @@ typedef struct _LogSourceOptions { - gint init_window_size; + gsize init_window_size; const gchar *group_name; gboolean keep_timestamp; gboolean keep_hostname...
1
1
1
[{"id": "G0", "claim": "The init_window_size field is a -1-initialized value, so the PR should use the signed gssize type instead of the unsigned gsize it chose.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
syslog-ng__syslog-ng__4551
syslog-ng/syslog-ng
4,551
defect
88252b1174e0277c30ffe7c33883756aad7d38a1
2db048cf418243c343963cd1f1a31cb1ad33247a
Replace `stats_instance` with metric labels
This PR replaces all occurrences of `stats_instance` with a more structured modern approach: metric labels. For backward-compatibility reasons, the legacy `stats_instance` name is still reproducible through the old API or by recreating it based on new-style labels.
diff --git a/lib/stats/stats-cluster-key-builder.c b/lib/stats/stats-cluster-key-builder.c index 3674e60d135..14ece806b20 100644 --- a/lib/stats/stats-cluster-key-builder.c +++ b/lib/stats/stats-cluster-key-builder.c @@ -34,6 +34,7 @@ struct _StatsClusterKeyBuilder gchar *name_prefix; gchar *name_suffix; GArra...
5
5
2
[{"id": "G0", "claim": "An unnecessary merged-labels construction happens when the builder was reset and no unsorted labels were added, and the code could check the length of unsorted_labels there too.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G3", "claim": "...
null
syslog-ng__syslog-ng__4553
syslog-ng/syslog-ng
4,553
defect
98a9bbada81e0fe38808b18986d97218ce3f2e65
3fe1c48ef406e043dd3d3733650bb49c1ec387d4
systemd-journal: enable multiple systemd-journal sources
<!-- Thank you for contributing to syslog-ng. Please make sure you: - Read our Contribution guideline: https://github.com/syslog-ng/syslog-ng/blob/master/CONTRIBUTING.md - Checked that tests pass (including stylechecks: `make style-check`) - Wrote a news file, if applicable: https://github.com/syslog-ng/syslog-ng/t...
diff --git a/modules/systemd-journal/journal-reader.c b/modules/systemd-journal/journal-reader.c index b5f3a1a7d14..ed1cf8815c0 100644 --- a/modules/systemd-journal/journal-reader.c +++ b/modules/systemd-journal/journal-reader.c @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 One Identity LLC. * Copyright (c) 2010-2014 Ba...
3
3
1
[{"id": "G0", "claim": "Removing the namespace from used_namespaces in _free() instead of _deinit() breaks `syslog-ng-ctl reload`: on a failed new-config init the revert re-initializes the old config against the stale list, errors with 'namespace already in use', and syslog-ng SIGQUITs itself; the reviewer asks that th...
null
syslog-ng__syslog-ng__4565
syslog-ng/syslog-ng
4,565
defect
317472438cee5fab529dabe286fae650d764ac65
6db45b2eedd333e68aa02878af8d0cbb400852ba
Message delay metrics
This adds a new metric to measure the outgoing message delay, which is a good indication of the health of our upstream connection. (e.g. are we building up the queue or it is normally emptied). This is still work in progress: - [x] no news file - [x] the log threaded driver piece is still missing This also co...
diff --git a/lib/logreader.c b/lib/logreader.c index bff8a95ef5a..547c8915101 100644 --- a/lib/logreader.c +++ b/lib/logreader.c @@ -440,8 +440,8 @@ log_reader_process_handshake(LogReader *self) static void _log_reader_insert_msg_length_stats(LogReader *self, gsize len) { - stats_aggregator_insert_data(self->max_me...
3
3
1
[{"id": "G0", "claim": "The year-2038 problem remains unfixed for the new age metrics: on 32-bit platforms the counter stores epoch seconds through the 32-bit setter (e.g. armv7), and the double-based relative formatting does not fix it either.", "category": "correctness", "verdict": "supported", "priority": "P1", "sco...
null
syslog-ng__syslog-ng__4567
syslog-ng/syslog-ng
4,567
defect
34c7112af7e3fc098b54e2ae436c91ba68247ae6
a55b25103a07e514e2e5a34d52f65f695c1d6a99
python: reference count python-option
`python_options_add_options()` took the ownership of the `PythonOption`, resulting in double frees in case of cloning. Fixes #4566
diff --git a/modules/python/python-grammar.ym b/modules/python/python-grammar.ym index 0ef67573b7a..bd9b9115646 100644 --- a/modules/python/python-grammar.ym +++ b/modules/python/python-grammar.ym @@ -142,7 +142,7 @@ python_dd_option | python_options_block { python_dd_add_options(last_d...
3
1
0
[{"id": "G0", "claim": "Reference counting for PythonOption should not be needed - ownership should be something simple, with a PythonOption owned by its container class (PythonOptions), which belongs to a driver.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "clai...
null
syslog-ng__syslog-ng__4630
syslog-ng/syslog-ng
4,630
defect
88f665fbfb1887e019423235e347b4a526f39d9e
8b3a4eaf1440bf319688d5bd5fbe2978936fcb8a
logthrdestdrv: worker partitioning
This PR is a preparation step for the Loki destination driver. ### `worker-partition-key()`: This option can be used to direct similar messages to the same worker. Similarity is determined based on hashing the value of the `worker-partition-key()` template specified by the user. It can be used to retain orderin...
diff --git a/lib/cfg-grammar.y b/lib/cfg-grammar.y index 05b15c72941..db54c781dcd 100644 --- a/lib/cfg-grammar.y +++ b/lib/cfg-grammar.y @@ -194,6 +194,7 @@ %token KW_MAX_DYNAMIC 10404 %token KW_SYSLOG_STATS 10405 %token KW_HEALTHCHECK_FREQ 10406 +%token KW_WORKER_PARTITION_...
2
2
1
[{"id": "G0", "claim": "Letting the user set a literal string for worker-partition-key() would be a clear misconfiguration and should not be allowed.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G6", "claim": "The worker key hash helper should live in lib/templates, ...
null
syslog-ng__syslog-ng__4655
syslog-ng/syslog-ng
4,655
defect
5a7dceb0a718784c32457187ea71dd0f128ff65d
ede106afd7d70a8f962acf10a4e3f4a50a70cb15
lib/transport/tls-context.c: fix libressl build
Fix the following build failure with libressl raised since version 4.0.0 and https://github.com/syslog-ng/syslog-ng/commit/bc05f28a4b511ac9090195280163a7f822712ceb: ``` lib/transport/tls-context.c: In function 'tls_context_setup_cmd_context': lib/transport/tls-context.c:320:3: error: unknown type name 'SSL_CONF_CTX...
diff --git a/cmake/openssl_functions.cmake b/cmake/openssl_functions.cmake index 5afbd7f12fd..da06ca59aa8 100644 --- a/cmake/openssl_functions.cmake +++ b/cmake/openssl_functions.cmake @@ -41,6 +41,7 @@ function (openssl_set_defines) X509_get_extension_flags DH_set0_pqg BN_get_rfc3526_prime_2048 + SSL...
1
1
1
[{"id": "G0", "claim": "With libressl (no SSL_CONF_CTX_new) the pull request compiles out the conf-cmd handling, so a user-configured openssl_conf_cmds list is silently ignored; the call should stay in place and an error should be reported (using the existing GError pattern in tls_context_set_conf_cmds) when conf_cmds ...
null
syslog-ng__syslog-ng__4663
syslog-ng/syslog-ng
4,663
defect
56e91abdcc9d6ccae3ebc16a7c1e788e285b30eb
76251750f40445af758e3eecd70bcbbcdb610b30
`http()`: templated `url()`
This PR does not implement generating metrics dynamically based on the resolution of the url, but we should do so in the future. Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
diff --git a/lib/template/templates.c b/lib/template/templates.c index 560bab0b41d..8019b63d14d 100644 --- a/lib/template/templates.c +++ b/lib/template/templates.c @@ -128,7 +128,7 @@ _calculate_if_literal(LogTemplate *self) if (!self->compiled_template) return TRUE; - if (self->escape || self->compiled_tem...
5
3
3
[{"id": "G0", "claim": "The PR should parse the beginning of the URL and not allow macros coming from the message in the scheme or the domain part of the URI (not even in escaped form).", "category": "security", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer asks t...
null
syslog-ng__syslog-ng__4679
syslog-ng/syslog-ng
4,679
defect
5e761f8cb979a49109ef607264393b48eebe5686
2d28c81e81e2efb3f6281176c34d06794d3e86c4
Driver specific templates followup
Follow up for #4666. Fixing https://github.com/syslog-ng/syslog-ng/pull/4666#discussion_r1365036653 and https://github.com/syslog-ng/syslog-ng/pull/4666#discussion_r1365085384.
diff --git a/lib/filter/filter-expr-grammar.ym b/lib/filter/filter-expr-grammar.ym index b4c13a6948b..08d4f9fd3e7 100644 --- a/lib/filter/filter-expr-grammar.ym +++ b/lib/filter/filter-expr-grammar.ym @@ -330,7 +330,7 @@ filter_match_opt filter_match_set_value_handle(last_filter_expr, log_msg_get_value_han...
1
1
0
[{"id": "G0", "claim": "The comment 'literal strings are not escaped' in the escaping unit test is misleading, because the tested template string is not a literal string (it contains template functions), so the comment should be rephrased.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope"...
null
syslog-ng__syslog-ng__4717
syslog-ng/syslog-ng
4,717
defect
a1535c1ae1a6f6c1d956e90cafac38f4401280f3
60688851fc912bc939749b291604343ec595aace
patterndb: Add support for nested quotted string in @QSTRING@
When using 2 chars to match quoted strings (e.g. `(), `[]`, `{}`), we want to detect nesting to capture the whole containing expression. Matching `(foo (bar (baz) qux)) quux` against `@QSTRING::()@` previously captured `(foo (bar (baz)` and now capture `(foo (bar (baz) qux))`. Fixes: #4716 Signed-off-by: Romain Tart...
diff --git a/modules/correlation/radix.c b/modules/correlation/radix.c index 12763659a9c..3dcd17c757e 100644 --- a/modules/correlation/radix.c +++ b/modules/correlation/radix.c @@ -52,23 +52,42 @@ r_parser_string(gchar *str, gint *len, const gchar *param, gpointer state, RPars gboolean r_parser_qstring(gchar *str, gi...
2
2
1
[{"id": "G0", "claim": "Retain the simplified single-delimiter case, where start and stop quotes are the same, using strchr (much faster than the new loop), by creating two functions — one for the simple case and one for the nested case — and deciding which to call in a wrapper that checks param[0] and param[1].", "cat...
null
syslog-ng__syslog-ng__4759
syslog-ng/syslog-ng
4,759
defect
672f6a90ab98316c8e004c35a79e97a5d37a557b
42c35ad431ca135eb002fd92c71936b2d6c68b14
logmatcher: fix storing matches if source handle changes
Example config for reproduction: ``` @version: 4.5 @include "scl.conf" source s_local { example-msg-generator(template("foo bar baz")); }; destination d_local { stdout(template("$A_foobar $MESSAGE $Z_barbaz")); }; log { source(s_local); parser { regexp-parser( patterns("(?<A_foob...
diff --git a/lib/logmatcher.c b/lib/logmatcher.c index 8f7140aa704..11c9b968c30 100644 --- a/lib/logmatcher.c +++ b/lib/logmatcher.c @@ -384,6 +384,7 @@ typedef struct _LogMatcherPcreMatchResult const gchar *source_value; gssize source_value_len; pcre2_match_data *match_data; + gboolean source_handles_value_c...
1
1
1
[{"id": "G0", "claim": "Setting source_handles_value_changed only when the source value is clobbered may be too late: when the regexp rewrites the input, indirect values should never be used, and this could be determined beforehand.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introd...
null
syslog-ng__syslog-ng__4777
syslog-ng/syslog-ng
4,777
defect
94e93836551b9bf2ca5fb1b14ca4f72967254114
0f01f71259f9afbc22d78158dcfc3573ab619680
Set transport macro for local mechanisms
This rounds up the setting of the $TRANSPORT macro for local log transport mechanisms. The convention used is: local+<whatever we used to get the message> * local+unix-stream, local+unix-dgram * local+file * local+pipe * local+program * local+devkmsg * local+journal * local+afstreams * local+...
diff --git a/lib/logmsg/logmsg.c b/lib/logmsg/logmsg.c index d28d98e6fba..55144d4e031 100644 --- a/lib/logmsg/logmsg.c +++ b/lib/logmsg/logmsg.c @@ -1429,7 +1429,7 @@ _merge_value(NVHandle handle, { LogMessage *msg = (LogMessage *) user_data; - if (!nv_table_is_value_set(msg->payload, handle)) + if (!log_msg_is...
2
1
0
[{"id": "G0", "claim": "Remove the leftover commented-out log_msg_set_value(LM_V_CMDLINE, ...) line in afprogram_sd_queue().", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "log_msg_set_value_to_string() runs strlen() on the string on the hot path...
null
syslog-ng__syslog-ng__4789
syslog-ng/syslog-ng
4,789
defect
f6eae6fbec26cf0205b44c599ff48b7a9086f0eb
381aaf289dfc9759739567bfb10c984820c89fb6
Msgformat macro
This PR adds the $MSGFORMAT name-value pair that contains the kind of parser we applied to parse the specific data. This is only set for syslog style messages (e.g. the ones using the msg-format mechanism), this helps you to diagnose misconfigured parsers.
diff --git a/lib/logmsg/logmsg.c b/lib/logmsg/logmsg.c index 49631164352..d2a133aa92a 100644 --- a/lib/logmsg/logmsg.c +++ b/lib/logmsg/logmsg.c @@ -2018,6 +2018,7 @@ log_msg_registry_init(void) nv_registry_add_predefined(logmsg_registry, LM_V_RAWMSG, "RAWMSG"); nv_registry_add_predefined(logmsg_registry, LM_V_...
1
1
1
[{"id": "G0", "claim": "The newly added LM_V_MSGFORMAT assignment is skipped by the earlier `return TRUE` success paths a few lines above in both syslog-format parse functions (one missed path in _syslog_format_parse_legacy, two in _syslog_format_parse_syslog_proto), so messages parsed via those paths do not get the fo...
null
syslog-ng__syslog-ng__4807
syslog-ng/syslog-ng
4,807
defect
e1a45a4ef42caad675d864588a3eb0db04225588
f72f485bf99f9609c879d8caafe901ae9132638f
logthrdest: add syslogng_output_event_retries_total metric
Example metrics: ``` syslogng_output_event_retries_total{driver="http",url="http://localhost:8888/${path}",id="#anon-destination0#0"} 5 ```
diff --git a/lib/logthrdest/logthrdestdrv.c b/lib/logthrdest/logthrdestdrv.c index dbf1f4e797b..29aa87f1bdc 100644 --- a/lib/logthrdest/logthrdestdrv.c +++ b/lib/logthrdest/logthrdestdrv.c @@ -226,7 +226,13 @@ _connect(LogThreadedDestWorker *self) evt_tag_int("worker_index", self->worker_index), ...
1
1
1
[{"id": "G0", "claim": "The retry counter should be incremented where actual delivery errors happen rather than in _connect(), where reloads and other normal reconnects also get counted — first suggested as around _rewind_batch() or on the error paths of _process_result(), and later asked to be put directly into rewind...
null
syslog-ng__syslog-ng__4852
syslog-ng/syslog-ng
4,852
defect
49379d7b42bab369dc060daa30e9b0441133aeb6
87f4afb07cacfbb8b798ee178fd8f644b9d22185
Filterx condition introduced
Filterx language is now able to handle conditionals, like 'if' and 'tenary'. ``` filterx{ #tenary $baz = (("foo" eq "foo") ? "tenary-foo" : "tenary-not-foo"); #if,elif,else if (false) { $foo = "bar"; $bar = $foo; } elif (false) { expressions... } else { expressions... }; } ```
diff --git a/lib/filterx/CMakeLists.txt b/lib/filterx/CMakeLists.txt index ec096a914cb..4bddc91f28b 100644 --- a/lib/filterx/CMakeLists.txt +++ b/lib/filterx/CMakeLists.txt @@ -27,6 +27,7 @@ set(FILTERX_HEADERS filterx/object-null.h filterx/object-primitive.h filterx/object-string.h + filterx/expr-con...
6
6
2
[{"id": "G0", "claim": "Split the branch-adding API so adding an elif branch does not go through add_else_branch() - e.g. two functions, add_elif_branch(condition, codeblock) and add_else_branch(codeblock).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "...
null
syslog-ng__syslog-ng__4862
syslog-ng/syslog-ng
4,862
defect
90ff59aaf09fb3350281325283319a18c0695a13
7ee01ac8533b145d357644085f7876ba0cebd722
[3/6] filterx: += operator with dict and list literals
We don't have generic dicts or lists in filterx. We have a dict and a list interface, which can be implemented by anyone. Literal dicts and lists do not make sense in this case, however with a bit of trickery we can make them "generator"s, which use the dict and list interfaces and operate on an actual implementatio...
diff --git a/lib/cfg-grammar.y b/lib/cfg-grammar.y index ef304e8b2ef..6e8a5dcf509 100644 --- a/lib/cfg-grammar.y +++ b/lib/cfg-grammar.y @@ -161,6 +161,7 @@ %left KW_AND 9002 %left KW_STR_EQ 9003 KW_STR_NE 9004, KW_TA_EQ 9005, KW_TA_NE 9006, KW_TAV_EQ 9007, KW_TAV_NE 9008 %left KW_STR_LT 9009, KW_STR_LE 9010, KW_...
1
1
1
[{"id": "G0", "claim": "Consider using something like `+=` (and allowing `+` too) instead of the new `<<` operator for dict extend / list append, since binary operators look better and feel more intuitive.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
syslog-ng__syslog-ng__4885
syslog-ng/syslog-ng
4,885
defect
2581a9d3a39cbe7f7bdc0f0a81887e917cfbf348
dc327e218adb570998318d1709d8913831bde9d4
Filterx add "declare"-d variables
This PR adds the "declare" keyword to filterx to indicate that a floating value is kept all along the pipeline. With this patch we are going to have 3 different kinds of variables: * message-tied ($MSG): values that are extracted from the message and synced back if they are changed. * locals (foo, wihout the '$'...
diff --git a/lib/filterx/expr-assign.c b/lib/filterx/expr-assign.c index 6fe8cae2e56..12485321339 100644 --- a/lib/filterx/expr-assign.c +++ b/lib/filterx/expr-assign.c @@ -22,6 +22,7 @@ */ #include "filterx/expr-assign.h" #include "filterx/object-primitive.h" +#include "scratch-buffers.h" static FilterXObject *...
1
1
1
[{"id": "G0", "claim": "The trace logging this pull request adds for assignments should also be added to the setattr and set-subscript expressions.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
syslog-ng__syslog-ng__4888
syslog-ng/syslog-ng
4,888
defect
c68e8cbecbe5bf70fbcb597280a486f456fa0191
22bb44acbb09ce8cff3421da37bd3fedb035dee6
filterx: fix expr eval truthy check on assign
truthy check on filterx assign caused the falsey values to turn statements evaluation to unmatched. - expr-assign - expr-setttr - expr-set-subscipt are no longer return the value of their expression. they return TRUE on success, NULL on error.
diff --git a/lib/filterx/expr-assign.c b/lib/filterx/expr-assign.c index 37890995e15..6fe8cae2e56 100644 --- a/lib/filterx/expr-assign.c +++ b/lib/filterx/expr-assign.c @@ -21,6 +21,7 @@ * */ #include "filterx/expr-assign.h" +#include "filterx/object-primitive.h" static FilterXObject * _eval(FilterXExpr *s) @@...
3
2
1
[{"id": "G0", "claim": "The change removed the cloning of the new value and the checking of the result of set_subscript()/setattr() in expr-set-subscript.c and expr-setattr.c, and they should be restored.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim"...
null
syslog-ng__syslog-ng__4890
syslog-ng/syslog-ng
4,890
defect
b57541d40f05a0daea73f2cfdaebb25e8921c7d6
dce3ae20741b00c8237a1668b111bff6f2dd9309
filterx: strptime builtin function implementation
filterx helper function to parse time strings into filterx datetime object. it's an alternative constructor for filterx datetime. accepts any number of time format string as parameters, returns with the first successfully parsed time representation. example: ``` filterx { $dt = strptime("2024-04-08T10:11:12Z", "i...
diff --git a/lib/filterx/filterx-globals.c b/lib/filterx/filterx-globals.c index 923f2a3156b..f7b446afc62 100644 --- a/lib/filterx/filterx-globals.c +++ b/lib/filterx/filterx-globals.c @@ -76,6 +76,7 @@ filterx_builtin_functions_init(void) g_assert(filterx_builtin_function_register("bool", filterx_typecast_boolean))...
5
4
3
[{"id": "G0", "claim": "A format that fails to match should not be treated as an error: the loop should just continue with the next format, keeping the message at trace or debug level.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "filterx_datetime_...
null
syslog-ng__syslog-ng__4896
syslog-ng/syslog-ng
4,896
defect
296c320d750956fe25a14dc498d633eeeeb7de84
48c9c27e4133e15af9c35b909c715456ce1bf553
inrduce Filterx istype builtin function
`istype` required to match to super types as well, this way the type check must be recursive/iterative. matching the type name strings with the type_str arguments could be a really slow operation. however filterx already has it's own effective recursive type matcher function, the `filterx_object_is_type(FilterXObject*,...
diff --git a/lib/filterx/CMakeLists.txt b/lib/filterx/CMakeLists.txt index 4665bd0fa23..60314764d97 100644 --- a/lib/filterx/CMakeLists.txt +++ b/lib/filterx/CMakeLists.txt @@ -33,7 +33,7 @@ set(FILTERX_HEADERS filterx/expr-condition.h filterx/expr-isset.h filterx/expr-unset.h - filterx/filterx-global...
1
1
0
[{"id": "G0", "claim": "The builtin should be named `istype` (without an underscore) instead of `is_type`, to be consistent with `isset()`/`unset()` naming.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
syslog-ng__syslog-ng__5063
syslog-ng/syslog-ng
5,063
defect
c95263cf8a51435f1e4e8812f3d01a27d9732e1c
81d9719b2b1b751a5fbe4306396bc59f8276cc5a
Add no-piggyback-errors flag to syslog-parser() and syslog related source drivers.
Backport of [#245](https://github.com/axoflow/axosyslog/pull/245) by @bazsi
diff --git a/lib/logmsg/logmsg.c b/lib/logmsg/logmsg.c index 8e77c2d9849..a4ffa2b0a1e 100644 --- a/lib/logmsg/logmsg.c +++ b/lib/logmsg/logmsg.c @@ -1263,6 +1263,19 @@ log_msg_format_sdata(const LogMessage *self, GString *result, guint32 seq_num) log_msg_append_format_sdata(self, result, seq_num); } +void +log_m...
1
1
0
[{"id": "G0", "claim": "Fix the small documentation issues in the news file: add the missing space before the `(`, correct the typo `netire`, and drop the unneeded comma before then.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
syslog-ng__syslog-ng__5087
syslog-ng/syslog-ng
5,087
defect
8902d29882cf86d65255e13eb5ef20e558f53da3
5a3da00a0ed299546e894d7939ad2ddee9c038aa
Syslog ng service crashes in g hash table lookup function after syslog ng ctl reload 5018
Fixes: #5018 Signed-off-by: Hofi <hofione@gmail.com>
diff --git a/lib/cfg.c b/lib/cfg.c index 2edfe70bd7c..d09f71efbfb 100644 --- a/lib/cfg.c +++ b/lib/cfg.c @@ -288,8 +288,6 @@ cfg_is_shutting_down(GlobalConfig *cfg) gboolean cfg_init(GlobalConfig *cfg) { - gint regerr; - msg_apply_config_log_level(cfg->log_level); if (cfg->file_template_name && !(cfg->file_te...
4
3
2
[{"id": "G0", "claim": "Initialise the new SignalSlotConnector *signal_connector member to NULL in log_driver_plugin_init_instance to avoid it containing junk.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Handle the signal_connector in the driver ...
null
syslog-ng__syslog-ng__5118
syslog-ng/syslog-ng
5,118
defect
7c0172274638b5fe57cac0f2c52b4f92d88434ac
043ce87152cd56f421686aa5a0361812a199f2e6
Update persist state instead of dropping it
This update of https://github.com/syslog-ng/syslog-ng/issues/5090 is based on [291](https://github.com/axoflow/axosyslog/pull/291/) by @MrAnno Signed-off-by: Hofi <hofione@gmail.com>
diff --git a/lib/persist-state.c b/lib/persist-state.c index e2002a00b2d..89dda40dc8a 100644 --- a/lib/persist-state.c +++ b/lib/persist-state.c @@ -359,6 +359,28 @@ _persist_state_copy_entry(PersistState *self, const PersistEntryHandle from, Per persist_state_unmap_entry(self, to); } +gboolean +persist_state_cop...
4
3
3
[{"id": "G0", "claim": "persist_name must be freed and set to NULL before the second _format_g_va_string call, otherwise the allocation from the previous g_vasprintf leaks and the call is made with a non-NULL pointer that glib's assert does not allow.", "category": "correctness", "verdict": "supported", "priority": "P1...
null
syslog-ng__syslog-ng__5315
syslog-ng/syslog-ng
5,315
defect
9f20db275474be69f22c71d52584dc7f9cf8f583
3df86cb77f40a2c2a1c72dd4a53950e0e72070eb
Wildcard file inotify
`wildcard-file`: Added inotify-based regular file change detection using the existing inotify-based directory monitor. This improves efficiency on OSes like Linux, where only polling was available before, significantly reducing CPU usage while enhancing change detection accuracy. To enable this feature, inotify k...
diff --git a/lib/logpipe.h b/lib/logpipe.h index 09945c8e57f..d64a8ba1c5b 100644 --- a/lib/logpipe.h +++ b/lib/logpipe.h @@ -41,6 +41,7 @@ #define NC_FILE_EOF 5 #define NC_REOPEN_REQUIRED 6 #define NC_FILE_DELETED 7 +#define NC_FILE_MODIFIED 8 /* notify result mask values */ #define NR_OK 0x0000 diff...
1
1
0
[{"id": "G0", "claim": "The self-assignment in the new declaration should be dropped — `GDir *directory = g_dir_open(self->real_path, 0, &error);` would have been enough.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
syslog-ng__syslog-ng__5317
syslog-ng/syslog-ng
5,317
defect
1eddc424a5287ca4f09656a1bb33bb573115cd91
159cbf78b6860a4af7b87bea26173a898fa37251
Fix directory monitor path chaos
Using now the full path everywhere Depends on https://github.com/syslog-ng/syslog-ng/pull/5315 Signed-off-by: Hofi <hofione@gmail.com>
diff --git a/lib/pathutils.c b/lib/pathutils.c index 47d80a65ed2..e913ea9beaa 100644 --- a/lib/pathutils.c +++ b/lib/pathutils.c @@ -24,6 +24,7 @@ */ #include "pathutils.h" +#include "messages.h" #include <sys/stat.h> #include <string.h> @@ -92,3 +93,98 @@ get_filename_extension(const gchar *filename) ret...
1
1
0
[{"id": "G0", "claim": "Add the missing newline at the end of the newly added lib/pathutils.c, whose last line (line 190, the closing brace of canonicalize_filename) has no trailing newline.", "category": "style", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
syslog-ng__syslog-ng__5390
syslog-ng/syslog-ng
5,390
defect
bc21b0b2ee87466808179cf3b77399d98148fe42
ebb59ddbedd583d1ae4d4a7e729bb6f77f7e348c
Move EOF detection and close-on-input to the proto, fix tls key update
Fixes the collectd() destination (we never read the server's response). Fixes possible starvation issue on the destination side when reading server responses Fixes: [604](https://github.com/axoflow/axosyslog/issues/604) and workarounds TLS-related state handling issues Backport of [609](https://github.com/axoflow/...
diff --git a/lib/logproto/logproto-text-client.c b/lib/logproto/logproto-text-client.c index 21b670e0d45..e15d8aa6522 100644 --- a/lib/logproto/logproto-text-client.c +++ b/lib/logproto/logproto-text-client.c @@ -36,27 +36,39 @@ log_proto_text_client_poll_prepare(LogProtoClient *s, gint *fd, GIOCondition *co *fd =...
1
1
0
[{"id": "G0", "claim": "log_writer_flush_finalize(), now used only once and reduced to a trivial passthrough by this change, might as well be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
syslog-ng__syslog-ng__5424
syslog-ng/syslog-ng
5,424
defect
90011b282a1ce6ec5b625b5621121ad4b323ba3e
b65632019a0a3de3e093e8e6f89639d832c26017
Add `without-orphaned-metrics` option to stats
Resolves: #5414 Doc: https://github.com/syslog-ng/syslog-ng.github.io/pull/224 Depends on: #5421
diff --git a/lib/logproto/logproto-http-scraper-responder-server.c b/lib/logproto/logproto-http-scraper-responder-server.c index 7f3f13cd2de..960411ac011 100644 --- a/lib/logproto/logproto-http-scraper-responder-server.c +++ b/lib/logproto/logproto-http-scraper-responder-server.c @@ -72,16 +72,18 @@ _compose_response_b...
2
1
0
[{"id": "G0", "claim": "Remove the commented-out increment of cmd_ndx or replace it with a comment instead of commented-out code.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The pull request's build failed.", "category": "correctness", "verdi...
null
syslog-ng__syslog-ng__5425
syslog-ng/syslog-ng
5,425
defect
9e97f81bd89211287f8568b39ce66294f83c9b12
925416957c15bdab8228deba18bb77e34c07e6fd
Add a filter for blank values
This is a follow-up of a discussion on the syslog-ng chat. A value is considered blank if it is not set, is an empty string, is an empty list, is a string with only whitespace, or is boolean false.
diff --git a/lib/filter/CMakeLists.txt b/lib/filter/CMakeLists.txt index e3d736099a1..f56e5457180 100644 --- a/lib/filter/CMakeLists.txt +++ b/lib/filter/CMakeLists.txt @@ -11,6 +11,7 @@ set(FILTER_HEADERS filter/filter-pri.h filter/filter-pipe.h filter/filter-expr-parser.h + filter/filter-blank.h ...
1
1
1
[{"id": "G0", "claim": "To pass the copyright check, the PR's new files (lib/filter/filter-blank.c, filter-blank.h, and test_filter_blank.c) must be added to tests/copyright/policy under the LGPL external section.", "category": "licensing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
syslog-ng__syslog-ng__5428
syslog-ng/syslog-ng
5,428
defect
388ee7b3d66077de3374c24919f82302cb4bcf7c
8c225ae9625a7b52d94bd0816a4a5573a5fd246e
Improved AIX compatibility
<!-- Thank you for contributing to syslog-ng. Please make sure you: - Read our Contribution guideline: https://github.com/syslog-ng/syslog-ng/blob/master/CONTRIBUTING.md - Checked that tests pass (including stylechecks: `make style-check`) - Wrote a news file, if applicable: https://github.com/syslog-ng/syslog-ng/t...
diff --git a/CMakeLists.txt b/CMakeLists.txt index 44e148d93f0..f5b9e332a23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -192,7 +192,9 @@ check_symbol_exists(getutent utmp.h SYSLOG_NG_HAVE_GETUTENT) check_symbol_exists(getutxent utmpx.h SYSLOG_NG_HAVE_GETUTXENT) check_symbol_exists(getaddrinfo "netdb.h;sys/soc...
5
5
3
[{"id": "G0", "claim": "The new compat asprintf() shim is dangerous because it returns glib-allocated memory that callers free with free(), so the four asprintf call sites should be replaced with glib functions (g_vasprintf, g_free/g_char) and the shim dropped in favour of another solution.", "category": "correctness",...
null
syslog-ng__syslog-ng__5471
syslog-ng/syslog-ng
5,471
defect
359f6ecfe26868f5c8c2f2988d752866745f53f3
afdaf665e82f62f3f7edfaae07b15d0348f02a18
building: produce correct, consistent boolean macros for boolean values both from autotools and cmake
TL;DR - in source code - use syslog-ng-config.h, never config.h - use SYSLOG_NG_HAVE_XXX, never HAVE_XXX - use #if SYSLOG_NG_HAVE_XXX, never #if defined(SYSLOG_NG_HAVE_XXX), $ifdef SYSLOG_NG_HAVE_XXX), etc. - for macros that should be used in source code - autotools - use our macros like CHECK_FUNC...
diff --git a/.github/workflows/devshell.yml b/.github/workflows/devshell.yml index adaa0578e33..c33dd1ded07 100644 --- a/.github/workflows/devshell.yml +++ b/.github/workflows/devshell.yml @@ -82,11 +82,14 @@ jobs: - name: autogen.sh if: matrix.build-tool == 'autotools' - run: ./autogen.sh + ...
4
4
0
[{"id": "G0", "claim": "The newly added CMake HP-UX (broken pread) block should be removed from both build systems because HP-UX is nearly end-of-life and not worth supporting.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The replacement of \"'t\" with...
null
syslog-ng__syslog-ng__5501
syslog-ng/syslog-ng
5,501
defect
2a34a6a8df97070d9ca8ff3a800f9d60498260fb
35b4f4b001b9f0e07ed6c7c3a20d0f2533c68bc9
Compression external testing
<!-- Thank you for contributing to syslog-ng. Please make sure you: - Read our Contribution guideline: https://github.com/syslog-ng/syslog-ng/blob/master/CONTRIBUTING.md - Checked that tests pass (including stylechecks: `make style-check`) - Wrote a news file, if applicable: https://github.com/syslog-ng/syslog-ng/t...
diff --git a/dbld/packages.manifest b/dbld/packages.manifest index 927ef786a56..4678e5d171d 100644 --- a/dbld/packages.manifest +++ b/dbld/packages.manifest @@ -18,6 +18,10 @@ unzip [centos, almalinux, fedora, debian, opensuse, rh # I dont know why this is needed. bzip2 ...
3
2
0
[{"id": "G0", "claim": "The compression tests disabled in PR #5503 must be re-enabled (uncomment the add_unit_test call for test_compression in modules/http/tests/CMakeLists.txt).", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}, {"id": "G1", "claim": "The compression test req...
null
syslog-ng__syslog-ng__5527
syslog-ng/syslog-ng
5,527
defect
55249348cee5bddb6a50b2aa559816caa145ca48
e69cd707885824b800496e9b4811d8f887dc44e7
Weird values in destination queued
Fixes: https://github.com/syslog-ng/syslog-ng/issues/5351 Related: https://github.com/syslog-ng/syslog-ng/issues/5528
diff --git a/lib/driver.c b/lib/driver.c index f507be9ce36..5c2ef920641 100644 --- a/lib/driver.c +++ b/lib/driver.c @@ -307,8 +307,15 @@ log_dest_driver_release_queue_method(LogDestDriver *self, LogQueue *q) GlobalConfig *cfg = log_pipe_get_config(&self->super.super); /* we only save the LogQueue instance if i...
2
1
0
[{"id": "G0", "claim": "The new CHECKED_COUNTER_ADD/CHECKED_COUNTER_SUB macros use g_assert, so a failing check would terminate the program, which is undesirable; a high-priority error message would be more appropriate here and below instead of the new asserts.", "category": "design", "verdict": "opposed", "priority": ...
null
syslog-ng__syslog-ng__5552
syslog-ng/syslog-ng
5,552
defect
8f4db8ab78c5ba2a88432b84c4d4991585717d05
b993e56f713832b44930af7554a8207ff19c0458
afsocket-source: Workaround of socket reopen failure on config reload
`afsocket-source`: Added a workaround for the issue where a reload switches from `keep-alive(yes)` to `keep-alive(no)` with `so-reuseport(no)`, causing the newly loaded config’s socket instance to fail to open. The current solution restores the existing connections during the first config reload if stored connection...
diff --git a/lib/mainloop.c b/lib/mainloop.c index dc0f9b7508e..c19dabcaa1d 100644 --- a/lib/mainloop.c +++ b/lib/mainloop.c @@ -248,8 +248,8 @@ main_loop_reload_config_revert(gpointer user_data) { MainLoop *self = (MainLoop *) user_data; - cfg_persist_config_move(self->new_config, self->old_config); cfg_dein...
1
1
1
[{"id": "G0", "claim": "The pull request writes into the wrong news file: it overwrites news/feature-5547.md, the news file belonging to another item, instead of adding its own news file, so the name of the news file should be checked and fixed.", "category": "documentation", "verdict": "supported", "priority": "P1", "...
null
syslog-ng__syslog-ng__5637
syslog-ng/syslog-ng
5,637
defect
b55e8d0b83333156d7bb423f47fba076a6bed111
2073a975b41b2e544264397a2d65495d52e74b82
timeutils: Accept "UTC" in `date-parser()`'s `%z` / `%Z` format strings
When parsing a date time zone with `%z` / `%Z`, syslog-ng use RFC 822's zone specification and Universal Time can be written either "UT" or "GMT". However "UTC", which is commonly used to indicate the "UTC+00:00" time zone (e.g. the jsonlog format of PostgreSQL when running with no time-zone offset output dates like t...
diff --git a/lib/timeutils/wallclocktime.c b/lib/timeutils/wallclocktime.c index bfc5b1ae3f9..3bd3c347dd6 100644 --- a/lib/timeutils/wallclocktime.c +++ b/lib/timeutils/wallclocktime.c @@ -654,12 +654,18 @@ wall_clock_time_strptime(WallClockTime *wct, const gchar *format, const gchar *i case 'G': ...
1
1
0
[{"id": "G0", "claim": "The comment block above the %z/%Z parsing code should be updated to cover the newly recognized formats (e.g. UTC).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
sysown__proxysql__3311
sysown/proxysql
3,311
defect
5f269af2b29ec2261f1a56d92702b899c3604175
9bffef415680504b5684272d11c7577a0984b7d5
Closes #3310: Improve error reporting for 'MySQL_Monitor' and 'MySQL_Session' backend connections via counters
Closes #3310.
diff --git a/include/MySQL_Monitor.hpp b/include/MySQL_Monitor.hpp index 8a8883bab1..9762399fd3 100644 --- a/include/MySQL_Monitor.hpp +++ b/include/MySQL_Monitor.hpp @@ -51,6 +51,26 @@ struct cmp_str { #define AWS_Aurora_Nentries 50 #define N_L_ASE 16 + +/** + * Enum holding the different connection errors that co...
14
14
5
[{"id": "G0", "claim": "The two monitor_connect_thread counter calls should use mysql_errno(mmsd->mysql) instead of hardcoding ER_ACCESS_DENIED_ERROR and ER_MUST_CHANGE_PASSWORD_LOGIN.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "When a connection is n...
null
sysown__proxysql__3335
sysown/proxysql
3,335
defect
5455b7d22851d849ff785f2a682b93e7afc4274d
4071096f38691f84632c179352f699e9ab81ee7c
Closes #3334: Fix crash and memory errors reported by valgrind for v2.1.1
Closes #3334.
diff --git a/lib/mysql_connection.cpp b/lib/mysql_connection.cpp index e3e201d57c..89cd98e25a 100644 --- a/lib/mysql_connection.cpp +++ b/lib/mysql_connection.cpp @@ -1620,7 +1620,9 @@ void MySQL_Connection::process_rows_in_ASYNC_STMT_EXECUTE_STORE_RESULT_CONT(unsi myds->bytes_info.bytes_recv += br; bytes_info.by...
3
3
3
[{"id": "G0", "claim": "The change hardcoding port 6033 in the mysql_real_connect call instead of cl.port should be reverted.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The stmt2a close-error path calls restore_admin(mysql) instead of restore_ad...
null
sysown__proxysql__4135
sysown/proxysql
4,135
defect
294c4f5898a22da249602a5c9d124a36eb2e586a
1df86c78ac6590a64e9b3f3237eb98060e134c3f
Fix max_transaction_time
Fixes #3957
diff --git a/lib/MySQL_Session.cpp b/lib/MySQL_Session.cpp index 9d8cfc04b6..b438b74cc6 100644 --- a/lib/MySQL_Session.cpp +++ b/lib/MySQL_Session.cpp @@ -4691,12 +4691,6 @@ int MySQL_Session::handler() { //unsigned int j; //unsigned char c; - if (active_transactions == 0) { - active_transactions=NumActiveTransa...
5
4
1
[{"id": "G0", "claim": "The commented-out SERVER_STATUS_IN_TRANS check is not redundant: NumActiveTransactions() should be called only when the backend connection itself is not in a transaction, so the session avoids fetching server_status of the other backends needlessly.", "category": "performance", "verdict": "suppo...
null
sysown__proxysql__4889
sysown/proxysql
4,889
defect
30794f3d6d630e62658aace618a1720cbd574354
df287b2024763a286649a640860643fa31142d5b
Added handling of SELECT @@version and SELECT VERSION() without backend
Added handling of SELECT @@version and SELECT VERSION() without backend. Currently returning server version as 8.0.0, but may be we should get it from global variables. Tested it manually. This change is related to aaiomysql third-party testing. mysql> select @@version; +------------------+ | select @@ve...
diff --git a/lib/MySQL_Session.cpp b/lib/MySQL_Session.cpp index 93a243a771..65bad1f078 100644 --- a/lib/MySQL_Session.cpp +++ b/lib/MySQL_Session.cpp @@ -56,6 +56,12 @@ using json = nlohmann::json; #define SELECT_VARIABLE_IDENTITY_LEN 17 #define SELECT_VARIABLE_IDENTITY_LIMIT1 "SELECT @@IDENTITY LIMIT 1" #define SE...
1
1
1
[{"id": "G0", "claim": "The version returned for SELECT @@version / SELECT VERSION() should be ProxySQL's configured `mysql-server_version` instead of the hardcoded BACKEND_SERVER_VERSION \"8.0.0\".", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
sysown__proxysql__5008
sysown/proxysql
5,008
defect
71e4fc6b88d272426f3231f557df8dbbf2998742
85d4c76fbdbcbdee5c228ef82cd0281bb1499eb5
Add OTel tracing configuration
Closes #5000.
diff --git a/deps/Makefile b/deps/Makefile index 87d2a20e8f..98c5a770b7 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -161,7 +161,7 @@ clickhouse-cpp/clickhouse-cpp/clickhouse/libclickhouse-cpp-lib-static.a: cd clickhouse-cpp && tar -zxf v2.3.0.tar.gz cd clickhouse-cpp && ln -fs clickhouse-cpp-*/ clickhouse-cpp...
5
1
1
[{"id": "G0", "claim": "The free(variables.resource_attributes) call in the trace_exporter_otlp_headers handler could lead to a double free or a free of uninitialized memory because resource_attributes is initialized only in the destructor and not in the constructor; verify that variables.resource_attributes is allocat...
null
sysown__proxysql__5113
sysown/proxysql
5,113
defect
0e54455026251c03d2efaa031bfc5ee790b7397c
f9d7934113c58a5f616a496ef6185fabb3f24cdd
Add validation for `LOAD * FROM CONFIG`
- Add validation methods for `mysql_users`, `pgsql_users`, `mysql_servers`, `pgsql_servers` and `proxysql_servers` - Check for duplicates and mandatory fields - Return descriptive error messages to clients when validation fails - Add new admin command `PROXYSQL SET CONFIG FILE` to dynamically change configuration...
diff --git a/include/proxysql_config.h b/include/proxysql_config.h index cf0d31b3de..6dffec6f6b 100644 --- a/include/proxysql_config.h +++ b/include/proxysql_config.h @@ -2,10 +2,19 @@ #define __PROXYSQL_CONFIG_H__ #include <string> +#include <libconfig.h++> class SQLite3DB; extern const char* config_header; ...
2
1
0
[{"id": "G0", "claim": "The config-file fallback block introduced by this PR reassigns `config_file` from `strdup` without freeing the previous allocation, leaking memory on startup each time `Proxy_file_regular` fails; the reviewer requests it be fixed.", "category": "performance", "verdict": "supported", "priority": ...
null
sysown__proxysql__5237
sysown/proxysql
5,237
defect
5d2d26d74e8c0eaa3dbf1860ee771d868f9b9bbc
b5370e90ea83d1dc0c9c3c636866fd656b38d56b
Add SSL support for backend connections in PGSQL monitor
PostgreSQL monitor now **supports client certificates** for SSL/TLS connections to backend servers. * Added two new metrics,` PgSQL_Monitor_ssl_connections_OK` and `PgSQL_Monitor_non_ssl_connections_OK` (in `stats_pgsql_global`), to improve visibility into PostgreSQL monitor connection status. Closes #[5205](http...
diff --git a/lib/PgSQL_Monitor.cpp b/lib/PgSQL_Monitor.cpp index 4db02cf77a..44b3cdad92 100644 --- a/lib/PgSQL_Monitor.cpp +++ b/lib/PgSQL_Monitor.cpp @@ -266,6 +266,13 @@ struct mon_srv_t { string addr; uint16_t port; bool ssl; + struct ssl_opts_t { + string ssl_p2s_key; + string ssl_p2s_cert; + string ssl_p2...
3
2
2
[{"id": "G0", "claim": "The aggregate initialization of mon_srv_t in ext_srvs initializes the SSL options as if they were direct members instead of members of the nested ssl_opts_t struct, which will cause a compilation error; an extra pair of braces is needed.", "category": "correctness", "verdict": "supported", "prio...
null
sysown__proxysql__5247
sysown/proxysql
5,247
defect
689bece9ab903ec25c9bd58f0f1e9ab3e9881c9b
6c97d3d244d33722afd72d07bb2d4c26c45785f7
Fix: Automatic prefix stripping for mysql_variables, pgsql_variables, and admin_variables config parsing
## Summary Fixes #5246 When users mistakenly include module prefix (e.g., "mysql-") in configuration variable names within `mysql_variables`, `pgsql_variables`, or `admin_variables` sections, the prefix is automatically stripped before storing in the database. ### Problem Users often write `mysql-log_unhealthy_connec...
diff --git a/include/proxysql_config.h b/include/proxysql_config.h index 6dffec6f6b..6fb7aa45ae 100644 --- a/include/proxysql_config.h +++ b/include/proxysql_config.h @@ -15,12 +15,25 @@ enum proxysql_config_type { PROXYSQL_CONFIG_PROXY_SERVERS, }; +/** + * @brief Configuration management class for ProxySQL. + * +...
1
1
0
[{"id": "G0", "claim": "The SQL query built with sprintf on lib/ProxySQL_Config.cpp line 126 interpolates configuration-file values without escaping, which is a critical SQL injection vulnerability; it should use prepared statements with parameter binding.", "category": "security", "verdict": "supported", "priority": "...
null
sysown__proxysql__5277
sysown/proxysql
5,277
defect
a83bba1cd069aa12e5a47e3a98cd0e93640f65d8
366164ab26a53270162e9b088eb1a859ce06500b
Fix #5272: Add mysql-select_version_forwarding variable for SELECT VERSION()
## Problem Since ProxySQL 3.0.4, `SELECT VERSION()` queries are intercepted and return ProxySQL's `mysql-server_version` variable instead of proxying to backend servers. This breaks SQLAlchemy and other MariaDB clients that expect "MariaDB" in the version string. **Example error:** ``` Unknown system variable 'transa...
diff --git a/include/MySQL_Session.h b/include/MySQL_Session.h index 9d4d6fe395..dae82c6b03 100644 --- a/include/MySQL_Session.h +++ b/include/MySQL_Session.h @@ -473,6 +473,18 @@ class MySQL_Session: public Base_Session<MySQL_Session, MySQL_Data_Stream, MySQL void reset_warning_hostgroup_flag_and_release_connection(...
2
2
0
[{"id": "G0", "claim": "The 0/1/2/3 mode values of mysql-select_version_forwarding should be replaced with a self-documenting enum instead of magic numbers.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The near-identical mode 2 and mode 3 bran...
null
sysown__proxysql__5285
sysown/proxysql
5,285
defect
ef872c7f4885a21e4578fff9b8d3bdbe4263ba2b
ba53c75c63617ab7d7b6cc2ab7a2f96456e5e772
Fix: pgsql_users.use_ssl not being enforced on frontend connections
### Problem: The `use_ssl` column in `pgsql_users` table was not being enforced. Clients could connect without SSL/TLS even when `use_ssl=1` was configured. ### Root Cause: During PostgreSQL frontend authentication, the `use_ssl` value retrieved from the database was never assigned to the session object. The SSL ...
diff --git a/include/PgSQL_Session.h b/include/PgSQL_Session.h index 55b1564291..098ddd14b5 100644 --- a/include/PgSQL_Session.h +++ b/include/PgSQL_Session.h @@ -528,16 +528,6 @@ class PgSQL_Session : public Base_Session<PgSQL_Session, PgSQL_Data_Stream, PgSQ //bool started_sending_data_to_client; // this status var...
2
1
0
[{"id": "G0", "claim": "The unused executeQueries function in the new test file is dead code and should be removed to improve maintainability.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The test's fixed usleep(100000) waits (here and at line...
null
sysown__proxysql__5299
sysown/proxysql
5,299
defect
7e9e00997d7d9fa4811c86c3a3bec9c886386e1f
a892d9a05bee734bc94cbcc6bd8a2ee746b7559d
Add parameterized PID support for pg_cancel_backend/pg_terminate_backend in extended query protocol
### Summary: This PR extends the existing support for `pg_cancel_backend()` and `pg_terminate_backend()` functions to work with parameterized queries in the extended query protocol. While literal PID values were already supported in both simple and extended query protocols, this enhancement adds support for parameteri...
diff --git a/include/PgSQL_Session.h b/include/PgSQL_Session.h index 098ddd14b5..39ec44d483 100644 --- a/include/PgSQL_Session.h +++ b/include/PgSQL_Session.h @@ -20,6 +20,7 @@ class PgSQL_Describe_Message; class PgSQL_Close_Message; class PgSQL_Bind_Message; class PgSQL_Execute_Message; +struct PgSQL_Param_Value; ...
17
8
6
[{"id": "G0", "claim": "The loop that finds the maximum parameter number mishandles multi-digit placeholders like $10 because the pointer is only advanced past one digit, and atoi() is used, which cannot report conversion errors; strtol with its end pointer is requested.", "category": "correctness", "verdict": "support...
null
sysown__proxysql__5353
sysown/proxysql
5,353
defect
a360dc22aed7de67d7349886b936a25d94a3c2a5
267b24e17f03b7a26fd366379909fba4c5b72591
Fix PostgreSQL prepared statement purge crash: use memory_order_acquire instead of memory_order_relaxed
### Summary Fix crash in PostgreSQL prepared statement purge caused by incorrect memory ordering. The purge thread was using `memory_order_relaxed` when checking `ref_count_client`, which doesn't guarantee visibility of concurrent modifications from client threads. Closes [#5352](https://github.com/sysown/proxysql/...
diff --git a/lib/PgSQL_PreparedStatement.cpp b/lib/PgSQL_PreparedStatement.cpp index 5c44e2c8f1..3a4b9400a7 100644 --- a/lib/PgSQL_PreparedStatement.cpp +++ b/lib/PgSQL_PreparedStatement.cpp @@ -291,24 +291,22 @@ void PgSQL_STMT_Manager::ref_count_client___purge_stmts_if_needed() noexcept { // meaning there are no o...
5
1
1
[{"id": "G0", "claim": "Turning the purge assert into an inner if that erases only when both refcounts are zero leaves the iterator unadvanced when use_count() == 1 but a refcount is still non-zero, so the loop can revisit the same element forever and hang the purge under the write lock; the reviewers ask that the iter...
null
sysown__proxysql__5367
sysown/proxysql
5,367
defect
80195edb82b78171a9a0a27a149884894098bd09
c74a1ad966ee14a9b6136be2151277c87a24861d
Add PostgreSQL psql meta-command support to admin interface
### Description This PR adds support for common `psql` meta-commands (`\dt`, `\di`, `\dv`, `\d`, `\l`) in ProxySQL's PostgreSQL admin interface (port 6132). The expanded queries targeting PostgreSQL system catalogs (`pg_catalog.pg_class`, `pg_catalog.pg_database`) are now intercepted and translated to SQLite queries a...
diff --git a/lib/Admin_Handler.cpp b/lib/Admin_Handler.cpp index 064eb52ccd..82ecc9c566 100644 --- a/lib/Admin_Handler.cpp +++ b/lib/Admin_Handler.cpp @@ -310,6 +310,136 @@ const std::vector<std::string> LOAD_COREDUMP_FROM_MEMORY = { extern unordered_map<string,std::tuple<string, vector<string>, vector<string>>> loa...
15
5
1
[{"id": "G0", "claim": "The 128-byte converted_pattern buffer can be exceeded when convert_regex_to_like doubles a pattern containing 64 or more single quotes, a potential buffer overflow; the buffer should be 256 bytes.", "category": "security", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": ...
null
sysown__proxysql__5385
sysown/proxysql
5,385
defect
5de836a4c1423f39f50d86d73f2904a6a4b10169
e1d420187525cc366d3683635f3cb70031484511
Fix #2233: Mirror sessions destination_hostgroup overwritten by fast routing
Fixes #2233 ## Problem Mirror sessions had their `destination_hostgroup` incorrectly overwritten by fast routing rules, causing duplicate query execution to the same hostgroup instead of routing the mirror query to its intended `mirror_hostgroup`. ## Solution Added a check in `Query_Processor.cpp` to skip fast rout...
diff --git a/lib/Query_Processor.cpp b/lib/Query_Processor.cpp index b02258b97d..2eb8cbf21c 100644 --- a/lib/Query_Processor.cpp +++ b/lib/Query_Processor.cpp @@ -1631,25 +1631,28 @@ Query_Processor_Output* Query_Processor<QP_DERIVED>::process_query(TypeSession* __exit_process_mysql_query: if (qr == NULL || qr->ap...
7
2
1
[{"id": "G0", "claim": "The test may fail if the ProxySQL user's default_schema is not 'main': the fast routing rule matches schemaname='main' but the client connects without a database (NULL), so the rule would not match and the original query would go to hostgroup 0 instead of the fast routing hostgroup; the reviewer...
null
sysown__proxysql__5455
sysown/proxysql
5,455
defect
e61e30dbb6512585f02713e98288890e792fb9a3
8e37bbaa5266a0a387e471bc78683ba66ffe3ee2
Fail fast on cross-module listener port conflicts
ProxySQL could start with MySQL and PostgreSQL modules listening on overlapping addresses/ports, leading to nondeterministic protocol handling and intermittent client failures. This change adds startup-time validation so conflicting listener configurations are rejected before any frontend listeners are opened. - **Sta...
diff --git a/include/proxysql_listen_validator.h b/include/proxysql_listen_validator.h new file mode 100644 index 0000000000..b286143dea --- /dev/null +++ b/include/proxysql_listen_validator.h @@ -0,0 +1,277 @@ +#ifndef PROXYSQL_LISTEN_VALIDATOR_H +#define PROXYSQL_LISTEN_VALIDATOR_H + +#include <algorithm> +#include <...
7
2
2
[{"id": "G0", "claim": "After the parser has taken the TCP path, an empty port_text should mark the entry invalid instead of reclassifying it as a unix_socket, since treating \"127.0.0.1:\", \"[::1]\" or \"[::1]:\" as valid unix sockets can raise a false cross-module conflict on typoed configs.", "category": "correctne...
null
sysown__proxysql__5456
sysown/proxysql
5,456
defect
e61e30dbb6512585f02713e98288890e792fb9a3
0357862590a308e58751edeaf7ce29a71e74105c
feat: Add stats_tls_certificates and stats_global tables for TLS certificate metadata and tracking
No way currently exists to inspect which SSL/TLS certificates ProxySQL has loaded, their validity periods, or reload history — without accessing the filesystem directly. ## New table: `stats_tls_certificates` Populated at query time (every query, no caching) by reading certs from disk via OpenSSL. `days_until_expiry`...
diff --git a/include/ProxySQL_Admin_Tables_Definitions.h b/include/ProxySQL_Admin_Tables_Definitions.h index 7214f3dcdb..78f4bae0b8 100644 --- a/include/ProxySQL_Admin_Tables_Definitions.h +++ b/include/ProxySQL_Admin_Tables_Definitions.h @@ -188,6 +188,8 @@ #define STATS_SQLITE_TABLE_MYSQL_CLIENT_HOST_CACHE "CREATE T...
5
3
3
[{"id": "G0", "claim": "The new char* pointers tls_cert_file, tls_ca_file and tls_key_file are allocated via strdup() in src/proxy_tls.cpp but the ProxySQL_GlobalVariables destructor never frees them, so add destructor cleanup following the existing pattern.", "category": "correctness", "verdict": "supported", "priorit...
null
sysown__proxysql__5457
sysown/proxysql
5,457
defect
e61e30dbb6512585f02713e98288890e792fb9a3
14ac53379a9dfa5d06cd335c2eae17305cdce1dc
Redact `admin-admin_credentials` from admin SET command logs
Updating `admin-admin_credentials` through the admin interface currently emits the full `SET` statement to stdout / `proxysql.log`, exposing the new credentials in container and Kubernetes logs. This change treats admin credential updates as sensitive log paths, consistent with existing handling for password-related va...
diff --git a/lib/Admin_Handler.cpp b/lib/Admin_Handler.cpp index 6d5e977f34..7e747bed35 100644 --- a/lib/Admin_Handler.cpp +++ b/lib/Admin_Handler.cpp @@ -1113,6 +1113,15 @@ static char* mask_sensitive_values_in_query(const char* query) { return masked; } +static bool is_sensitive_set_variable_name(const char* var...
7
1
1
[{"id": "G0", "claim": "The test's log-scan retry loop only strips failbit from the stream state, so after the first full scan getline() leaves eofbit set and later attempts may never observe newly appended log lines, making the retry window effectively single-shot and prone to flaking on slower log flushes.", "categor...
null
sysown__proxysql__5458
sysown/proxysql
5,458
defect
e61e30dbb6512585f02713e98288890e792fb9a3
33e125ef59576501c95fdde5c32d9be18e660475
Add MySQL protocol ZSTD compression support
ProxySQL only negotiated and processed MySQL zlib compression (`CLIENT_COMPRESS`), even though the protocol also supports ZSTD (`CLIENT_ZSTD_COMPRESSION_ALGORITHM`). This change extends ProxySQL’s handshake and packet compression paths to understand ZSTD so compressed frontend/backend sessions can use the newer algorit...
diff --git a/include/MySQL_Protocol.h b/include/MySQL_Protocol.h index 946fcc2d5d..16a2e682da 100644 --- a/include/MySQL_Protocol.h +++ b/include/MySQL_Protocol.h @@ -109,7 +109,9 @@ class MyProt_tmp_auth_vars { uint32_t capabilities = 0; uint32_t max_pkt; uint32_t pass_len; + uint8_t zstd_compression_level = ...
6
4
3
[{"id": "G0", "claim": "The new alias macros in include/proxysql.h only handle the MySQL/MariaDB naming split, so building against connector headers that define neither CLIENT_ZSTD_COMPRESSION nor CLIENT_ZSTD_COMPRESSION_ALGORITHM (e.g. ProxySQL's minimum supported MariaDB Connector/C 3.1.x) fails to compile; add a saf...
null
sysown__proxysql__5460
sysown/proxysql
5,460
defect
1a0dea6da05c29a741978de1012c9313129e6467
834785e17011d18ffbf90f66c27c7c94fae31f82
Fix TAP tests for CI migration to per-container hostnames
## Summary This PR fixes TAP tests that were failing in the legacy/legacy-g1 test groups after the CI migration to per-container hostnames. The changes replace hardcoded `127.0.0.1` and `proxysql` host references with environment-driven host/port configuration, enabling tests to work correctly in containerized environ...
diff --git a/test/infra/README.md b/test/infra/README.md index 390607cf5c..2b424f9e91 100644 --- a/test/infra/README.md +++ b/test/infra/README.md @@ -16,6 +16,25 @@ cd ../../../ **Note:** Using `--network host` is recommended if you encounter DNS resolution hangs during the build process. +--- + +## 0.1. Building...
5
1
1
[{"id": "G0", "claim": "If TAP_HOST is only provided via the dotenv mechanism rather than exported in the process environment, base_address is built at static-initialization time before env loading and keeps the fallback 'proxysql' host, so configure_endpoints() probes the wrong RESTAPI host; it should be computed afte...
null
sysown__proxysql__5502
sysown/proxysql
5,502
defect
f3b9eda2960c956e6d30298be6468b44e876bcc9
37ce0525bb40edf64babeaef84e071513d901829
Phase 3.1: Connection pool decision extraction + unit tests
## Summary Clean implementation of Phase 3.1 (#5489): extracts connection pool decision logic into pure, unit-testable functions. Replaces PR #5500 (which had compilation issues and improper test structure). ### Production changes (cherry-picked from Copilot's PR #5500, with fixes): - **`ConnectionPoolDecision.h`**: ...
diff --git a/include/Base_HostGroups_Manager.h b/include/Base_HostGroups_Manager.h index 2fcbac4a77..a03a4c4e55 100644 --- a/include/Base_HostGroups_Manager.h +++ b/include/Base_HostGroups_Manager.h @@ -143,6 +143,8 @@ class MetricsCollector; typedef std::unordered_map<std::uint64_t, void *> umap_mysql_errors; +#i...
7
2
1
[{"id": "G0", "claim": "Casting the int64_t max_connections to unsigned int in the evaluate_pool_state call sites and using unsigned int in calculate_eviction_count/evaluate_pool_state/num_to_evict can truncate or overflow and lead to incorrect pool decisions for large values, so the signatures should use uint64_t and ...
null
sysown__proxysql__5506
sysown/proxysql
5,506
defect
c54e6e18059072634b4f176fd76d344c09ed5a1b
f772c104def7f03767701aa37f58e5686764b96d
HostGroups Manager unit tests (Phase 2.6)
## Summary Implements **Phase 2.6** (#5478) of the Unit Testing Framework: unit tests for `MySQL_HostGroups_Manager` and `PgSQL_HostGroups_Manager`. - **17 TAP test cases** across 8 test functions - Runs in **<0.01 seconds** with zero infrastructure dependencies - Tests the real managers with their internal SQLite3 d...
diff --git a/test/tap/test_helpers/test_init.cpp b/test/tap/test_helpers/test_init.cpp index a0e782028f..4c9cb064f1 100644 --- a/test/tap/test_helpers/test_init.cpp +++ b/test/tap/test_helpers/test_init.cpp @@ -167,3 +167,37 @@ void test_cleanup_query_processor() { // components may still reference them. Their cleanu...
6
3
2
[{"id": "G0", "claim": "test_cleanup_query_processor() is declared twice in test/tap/test_helpers/test_init.h (once before and once after test_cleanup_hostgroups()), and the duplicate declaration should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id":...
null
sysown__proxysql__5507
sysown/proxysql
5,507
defect
b0889e13139f487a40b1dbaa2563adb7e0be2b5b
24db561c0933d5489e7e520e9f2a1eb06982df73
Phase 3.3: Monitor health state decision extraction + unit tests
## Summary Implements **Phase 3.3** (#5491): extracts monitor health decision logic into pure, unit-testable functions. ### Production changes: - **`include/MonitorHealthDecision.h`**: 4 pure function declarations with Doxygen - **`lib/MonitorHealthDecision.cpp`**: Implementations extracted from MySrvC::connect_error...
diff --git a/include/MonitorHealthDecision.h b/include/MonitorHealthDecision.h new file mode 100644 index 0000000000..b186fec879 --- /dev/null +++ b/include/MonitorHealthDecision.h @@ -0,0 +1,95 @@ +/** + * @file MonitorHealthDecision.h + * @brief Pure decision functions for monitor health state transitions. + * + * Ex...
7
3
2
[{"id": "G0", "claim": "The multiplication shun_recovery_time_sec * 1000 could overflow a 32-bit int for large configured recovery times (the validator allows up to 3600*24*365 seconds), which is undefined behavior and could break the timeout-cap check; use a 64-bit intermediate for the multiplication and comparison.",...
null
sysown__proxysql__5508
sysown/proxysql
5,508
defect
b0889e13139f487a40b1dbaa2563adb7e0be2b5b
754878f75742e0ab25889a8eaf004f6db444b268
Phase 3.4: Server selection algorithm extraction + unit tests
## Summary Implements **Phase 3.4** (#5492): extracts server selection algorithm into pure, unit-testable functions. ### Production changes: - **`include/ServerSelection.h`**: `ServerCandidate` struct (lightweight, no MySrvC dependency) + `is_candidate_eligible()` + `select_server_from_candidates()` - **`lib/ServerSe...
diff --git a/include/ServerSelection.h b/include/ServerSelection.h new file mode 100644 index 0000000000..cc7c2a23dd --- /dev/null +++ b/include/ServerSelection.h @@ -0,0 +1,79 @@ +/** + * @file ServerSelection.h + * @brief Pure server selection algorithm for unit testability. + * + * Extracted from get_random_MySrvC()...
11
4
1
[{"id": "G0", "claim": "The cast of int64_t total_weight to unsigned int in the modulo truncates 64-bit values, which can cause a modulo-by-zero crash when total_weight is a multiple of 2^32 and biases selection otherwise; the modulo should be performed against the 64-bit total without narrowing casts.", "category": "c...
null
sysown__proxysql__5509
sysown/proxysql
5,509
defect
586fb734f88de0d6b32ae169f68e606b5bc006bd
98249bcd5a24a80b23aa6f2634b203c972d361fb
Phase 3.5: Hostgroup routing decision extraction + unit tests
## Summary Implements **Phase 3.5** (#5493): extracts hostgroup routing decision logic into a pure function. - **`include/HostgroupRouting.h`**: `HostgroupRoutingDecision` struct + `resolve_hostgroup_routing()` - **`lib/HostgroupRouting.cpp`**: implementation mirroring get_pkts_from_client() routing block - **20 test ...
diff --git a/include/HostgroupRouting.h b/include/HostgroupRouting.h new file mode 100644 index 0000000000..9ba9e386f2 --- /dev/null +++ b/include/HostgroupRouting.h @@ -0,0 +1,52 @@ +/** + * @file HostgroupRouting.h + * @brief Pure hostgroup routing decision logic for unit testability. + * + * Extracted from MySQL_Ses...
3
2
1
[{"id": "G0", "claim": "The trailing '... fix' in the assertion-count comment is misleading since the total already matches plan(20); remove it or update it to reflect the correct total.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a test ca...
null
sysown__proxysql__5510
sysown/proxysql
5,510
defect
586fb734f88de0d6b32ae169f68e606b5bc006bd
8d12befb5f48e6417f0aa6eeacedbe9e30b984e9
Phase 3.8: Transaction state tracking extraction + unit tests
## Summary Implements **Phase 3.8** (#5496): extracts transaction state tracking into pure functions. - **`include/TransactionState.h`**: `update_transaction_persistent_hostgroup()` + `is_transaction_timed_out()` - **`lib/TransactionState.cpp`**: implementations - **17 test cases**: persistence disabled, txn start/end...
diff --git a/include/TransactionState.h b/include/TransactionState.h new file mode 100644 index 0000000000..e6456008a2 --- /dev/null +++ b/include/TransactionState.h @@ -0,0 +1,48 @@ +/** + * @file TransactionState.h + * @brief Pure transaction state tracking logic for unit testability. + * + * Extracted from MySQL_Ses...
6
4
1
[{"id": "G0", "claim": "The @param docs for is_transaction_timed_out should state that transaction_started_at and current_time are in microseconds and that any max_transaction_time_ms <= 0 (not only 0) disables the timeout, since the current text is inconsistent with the implementation and could mislead users.", "categ...
null
sysown__proxysql__5511
sysown/proxysql
5,511
defect
1354b798b1d9c2c3c2e38adbe1fa0ec22cd71e9e
bc4251d5892b4a188140926546b0aa01f7d83646
Phase 3.6: Backend variable sync decisions + unit tests
Implements #5494. Extracts determine_backend_sync_actions() — 15 tests covering user/schema/autocommit mismatch detection. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added backend synchronization decision logic to detect required sync ste...
diff --git a/include/BackendSyncDecision.h b/include/BackendSyncDecision.h new file mode 100644 index 0000000000..b0be1728a0 --- /dev/null +++ b/include/BackendSyncDecision.h @@ -0,0 +1,48 @@ +/** + * @file BackendSyncDecision.h + * @brief Pure decision functions for backend variable synchronization. + * + * Extracted ...
3
2
2
[{"id": "G0", "claim": "The user and schema comparisons only run when both pointers are non-NULL, so an asymmetric NULL (one side NULL, the other not) is treated as a match and the required SYNC_USER/SYNC_SCHEMA action is not flagged, potentially leading to incorrect session state.", "category": "correctness", "verdict...
null
sysown__proxysql__5512
sysown/proxysql
5,512
defect
1354b798b1d9c2c3c2e38adbe1fa0ec22cd71e9e
56eb121f126b45e27dc2fb98783601365ba3a30f
Phase 3.7: MySQL error classification + unit tests
Implements #5495. Extracts classify_mysql_error() and can_retry_on_new_connection() — 19 tests covering retryable errors (1047/1053), blocking conditions, and offline retry. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Improvements** * Enhanced MySQL error ...
diff --git a/include/MySQLErrorClassifier.h b/include/MySQLErrorClassifier.h new file mode 100644 index 0000000000..9b46549db8 --- /dev/null +++ b/include/MySQLErrorClassifier.h @@ -0,0 +1,76 @@ +/** + * @file MySQLErrorClassifier.h + * @brief Pure MySQL error classification for retry decisions. + * + * Extracted from ...
7
2
0
[{"id": "G0", "claim": "The retryable-error check in classify_mysql_error() can be simplified by returning MYSQL_ERROR_REPORT_TO_CLIENT directly from the switch's default branch instead of using the retryable_error flag and a following if.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scop...
null
sysown__proxysql__5514
sysown/proxysql
5,514
defect
1354b798b1d9c2c3c2e38adbe1fa0ec22cd71e9e
a066763ee9f4d7893b512955ff8fd419f956d3aa
Phase 3.10: PgSQL error classification + unit tests
Implements #5498. Extracts classify_pgsql_error() by SQLSTATE class and pgsql_can_retry_error() — 25 tests covering connection/transaction/resource/fatal/syntax/constraint errors. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Introduced Post...
diff --git a/include/PgSQLErrorClassifier.h b/include/PgSQLErrorClassifier.h new file mode 100644 index 0000000000..1be6b1e6ef --- /dev/null +++ b/include/PgSQLErrorClassifier.h @@ -0,0 +1,57 @@ +/** + * @file PgSQLErrorClassifier.h + * @brief Pure PgSQL error classification for retry decisions. + * + * Classifies Post...
5
2
1
[{"id": "G0", "claim": "classify_pgsql_error can be made more efficient and slightly cleaner by using strncmp directly on the sqlstate string instead of strlen plus a temporary cls buffer.", "category": "performance", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "pgsql_can_ret...
null
sysown__proxysql__5554
sysown/proxysql
5,554
defect
d0625dc243296b99c199203982aa508078580447
13647ce3f11e4e5b5a8d162688c71bfd8e7aca1f
Add `mysql-resolution_family` to control IPv4/IPv6 hostname resolution
ProxySQL currently defers backend hostname resolution entirely to the system resolver, which can cause `mysql_servers.hostname` entries to resolve to IPv4 or IPv6 unpredictably depending on host policy and DNS responses. This change adds a global MySQL setting to make address-family selection deterministic when needed,...
diff --git a/include/MySQL_Resolution.h b/include/MySQL_Resolution.h new file mode 100644 index 0000000000..fe1f5568c5 --- /dev/null +++ b/include/MySQL_Resolution.h @@ -0,0 +1,34 @@ +#ifndef MYSQL_RESOLUTION_H +#define MYSQL_RESOLUTION_H + +#include <strings.h> +#include <sys/socket.h> + +inline bool mysql_resolution_...
1
1
1
[{"id": "G0", "claim": "Reading `resolution_family` via `GloMTH->get_variable_string()` in `monitor_dns_resolver_thread()` without holding the MySQL threads handler lock can race with a concurrent `set_variable()` (free()+strdup()) and lead to use-after-free/crash, so the variable should be fetched in a thread-safe way...
null
sysown__proxysql__5567
sysown/proxysql
5,567
defect
63007cfa3966d43ec45c6574a719ef2f770752a2
f2bd22214550fd58e555412f6cf55cc4bfdc1cdf
Add SSL/TLS traffic decryption for PostgreSQL backend connections
## Summary Extends ProxySQL's existing NSS keylog-based SSL decryption support to PostgreSQL backend connections (ProxySQL → PostgreSQL server). When `admin-ssl_keylog_file` is configured, TLS secrets from PgSQL backend SSL handshakes are now captured in NSS Key Log Format, enabling traffic decryption with Wir...
diff --git a/deps/Makefile b/deps/Makefile index bfb9421deb..29be815d97 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -370,6 +370,7 @@ postgresql/postgresql/src/interfaces/libpq/libpq.a: cd postgresql/postgresql && patch -p0 < ../fmt_err_msg.patch cd postgresql/postgresql && patch -p0 < ../bind_fmt_text.patch ...
4
1
0
[{"id": "G0", "claim": "The numbering of the 'Solutions' troubleshooting list in doc/ssl_keylog/ssl_keylog_user_guide.md is inconsistent after the new PostgreSQL steps were inserted — the list goes 4 back to 3 — and the items should be renumbered sequentially.", "category": "documentation", "verdict": "supported", "pri...
null
sysown__proxysql__5577
sysown/proxysql
5,577
defect
7510d8073a3fb8883be348d4152241f285b699ee
3296ed5a07e0adf7a7b644e55cb28f633d91b8a5
Fix CI test failures and workflow race conditions
## Summary - **Fix race condition in CI-legacy-\* workflow triggers**: All 4 CI-legacy workflows (`clickhouse-g1`, `g2`, `g2-genai`, `g4`) used `types: [ in_progress ]` which fired before CI-builds finished, causing cache-miss failures. Changed to `types: [ completed ]` with success guard, matching CI-taptests-groups....
diff --git a/.github/workflows/CI-legacy-clickhouse-g1.yml b/.github/workflows/CI-legacy-clickhouse-g1.yml index 84631498af..84ebbfe1e8 100644 --- a/.github/workflows/CI-legacy-clickhouse-g1.yml +++ b/.github/workflows/CI-legacy-clickhouse-g1.yml @@ -5,7 +5,7 @@ on: workflow_dispatch: workflow_run: workflows...
2
1
0
[{"id": "G0", "claim": "Both scenarios set mysql_users.default_hostgroup=0 for the test user but never restore the original value in cleanup, which can leave global state mutated and make later TAP tests sharing the ProxySQL instance order-dependent; the original value should be saved and restored during cleanup.", "ca...
null
sysown__proxysql__5581
sysown/proxysql
5,581
defect
d7a26b79e936557e2d198148ce6d09111210d651
0e5fd66d467bbb672a321df0e74fd08425c09ef7
Preserve prepared statement `min_gtid` in `first_comment_parsing` mode
Issue --- When `first_comment` parsing runs before query rule processing, query rules can strip the `min_gtid` annotation during `STMT_PREPARE`. As a result, `STMT_EXECUTE` can run without the original `min_gtid` constraint. Refs --- - Commit - 1c25787b886aecba4530babf0a46a1dd248df7e6 - https://github.com/sysow...
diff --git a/include/MySQL_PreparedStatement.h b/include/MySQL_PreparedStatement.h index af3776fcb3..bd16284523 100644 --- a/include/MySQL_PreparedStatement.h +++ b/include/MySQL_PreparedStatement.h @@ -189,6 +189,8 @@ class MySQL_STMTs_local_v14 { public: // this map associate client_stmt_id to global_stmt_id : th...
5
1
1
[{"id": "G0", "claim": "The logic checking mysql_thread___query_processor_first_comment_parsing and persisting min_gtid, duplicated between the COM_STMT_PREPARE handler and handler_rc0_PROCESSING_STMT_PREPARE in lib/MySQL_Session.cpp, should be extracted into a shared helper function.", "category": "maintainability", "...
null
sysown__proxysql__5614
sysown/proxysql
5,614
defect
04466b35a5290f82313297dee205680c8feb02cf
30be016be5f3af403feca2f624f19f612bd62890
fix(pgsql-monitor): clamp next_*_at on LOAD PGSQL VARIABLES TO RUNTIME
Closes the `pgsql-servers_ssl_params-t` line item on #5610. Fourth and final of the four tests from that issue. **This PR is code + test together** because the scheduler fix alone wouldn't make the test pass, and the test fix alone is useless without the scheduler fix. Reviewable in two distinct blocks below. --- ##...
diff --git a/lib/PgSQL_Monitor.cpp b/lib/PgSQL_Monitor.cpp index 30fab67277..538d6d993d 100644 --- a/lib/PgSQL_Monitor.cpp +++ b/lib/PgSQL_Monitor.cpp @@ -2533,14 +2533,71 @@ void* PgSQL_monitor_scheduler_thread() { // Check variable version changes; refresh if needed unsigned int glover = GloPTH->get_global_...
4
1
0
[{"id": "G0", "claim": "The variable-refresh check and the new clamping logic sit inside the `if (cur_intv_start >= closest_intv)` block, so a shorter interval set via LOAD PGSQL VARIABLES TO RUNTIME is not detected until the shortest of the old intervals expires; they should be moved outside and before the `closest_in...
null
sysown__proxysql__5623
sysown/proxysql
5,623
defect
63007cfa3966d43ec45c6574a719ef2f770752a2
c3532088d4668b26cb6e88c623f887c3949356ec
Fix regression: restore upper-word capabilities dropped from greeting
## Summary Fixes a regression introduced in commit `8c6a6444d` ("fix: support zstd compression in mysql84 TAP") and shipped in **v3.0.7**. That commit refactored `MySQL_Protocol::generate_pkt_initial_handshake` and accidentally removed the `extended_capabilities` local that supplied the upper-word bits of the Server G...
diff --git a/include/MySQL_Thread.h b/include/MySQL_Thread.h index 6725ff730f..bbae7ea094 100644 --- a/include/MySQL_Thread.h +++ b/include/MySQL_Thread.h @@ -584,6 +584,7 @@ class MySQL_Threads_Handler bool kill_backend_connection_when_disconnect; bool client_session_track_gtid; bool enable_client_deprecate_e...
3
2
1
[{"id": "G0", "claim": "check_server_capabilities() can still return success when an earlier flag check fails but the last one passes, because caps_match is overwritten instead of accumulated.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The tests...
null
sysown__proxysql__5642
sysown/proxysql
5,642
defect
04f09d65358cd74eb8253d7d4b02f2453672032e
98aee7db2132dd1ce9f731b7f50f4ec5d773accb
chore(mysqlx): retire dormant MysqlxWorker path and its smoke test
## Summary Removes the mysqlx worker implementation and its TAP smoke test. Both were vestigial: an earlier parallel design for the session path that never reached any call site in the production proxysql binary. - **Production code deleted:** `plugins/mysqlx/src/mysqlx_worker.cpp`, `plugins/mysqlx/include/mysqlx_wor...
diff --git a/plugins/mysqlx/Makefile b/plugins/mysqlx/Makefile index 5a95f044ef..a9140caebc 100644 --- a/plugins/mysqlx/Makefile +++ b/plugins/mysqlx/Makefile @@ -31,7 +31,6 @@ CXXFLAGS := $(STDCPP) -fPIC $(OPTZ) $(WGCOV) $(WASAN) -pthread SRCS := $(PLUGIN_DIR)/src/mysqlx_plugin.cpp \ $(PLUGIN_DIR)/src/mysqlx_admin_...
6
1
1
[{"id": "G0", "claim": "The files mysqlx_frontend_session.cpp and mysqlx_backend_session.cpp, left unreferenced by the retirement of the MysqlxWorker path, should be removed from the build and deleted from the repository.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "introduced"},...
null
sysown__proxysql__5644
sysown/proxysql
5,644
defect
04f09d65358cd74eb8253d7d4b02f2453672032e
3e8c3da9debdf8a960e94ab45ade42762c84c33d
fix(mysqlx): preserve backend TLS state past auth handshake
## Summary Fixes the backend-TLS-lost-after-auth bug flagged as review item #2 in the ProtocolX code review: the active mysqlx session path was rewrapping the backend fd in a plain `MysqlxDataStream` after auth, losing the SSL* object that the TLS handshake had attached to `backend_conn_->backend_ds_`. **Before:** `h...
diff --git a/plugins/mysqlx/include/mysqlx_config_store.h b/plugins/mysqlx/include/mysqlx_config_store.h index b9a8ed6e9e..aecd792ac6 100644 --- a/plugins/mysqlx/include/mysqlx_config_store.h +++ b/plugins/mysqlx/include/mysqlx_config_store.h @@ -22,6 +22,7 @@ MysqlxBackendAuthMode mysqlx_backend_auth_mode_from_string(...
6
1
1
[{"id": "G0", "claim": "In MysqlxConnection::check_connect() the new poll() call folds errors (pr < 0) into the 'not ready yet' path without inspecting revents error flags like POLLNVAL, and getsockopt()'s return value is ignored, so on error the session handler may loop indefinitely or incorrectly report a successful ...
null
sysprog21__concurrent-programs__18
sysprog21/concurrent-programs
18
defect
342506f74b7b9dcc3ae358254ce896fffb98cd07
e02739318edd9ff0d442c389cba53c96fadb1ba5
lf-queue: Rewrite based on Nikolaev's paper and hazard pointers
Instead of using the old implementation, a concurrent queue 'lfq' is provided, which can utilize hazard pointers to release memory. The program has been rewritten using C11 Atomics to support other processor architectures, and it has solved the data race issues, enabling it to pass the runtime detection of Thread Sa...
diff --git a/lf-queue/Makefile b/lf-queue/Makefile old mode 100644 new mode 100755 index 2f78761..f6a140e --- a/lf-queue/Makefile +++ b/lf-queue/Makefile @@ -1,14 +1,17 @@ -CFLAGS = -Wall -O2 -g -I. -LDFLAGS = -lpthread +all: + gcc -std=gnu11 -O3 -Wall -Wextra -o main1 -D MAX_PRODUCER=1 -D MAX_CONSUMER=1 lfq.c test....
15
15
0
[{"id": "G0", "claim": "The Makefile should use modularized build rules like the referenced jitboy Makefile instead of four hardcoded gcc recipe lines.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The README paragraphs describing the original ...
null