Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid using the deprecated GTimeVal type #4741

Merged
merged 14 commits into from
Jan 9, 2024

Conversation

bazsi
Copy link
Collaborator

@bazsi bazsi commented Dec 7, 2023

While working with #4739 it turned out that the easy fix for that is to upgrade
GLIB_MIN_VERSION to 2.68.

But glib deprecated GTimeVal that is scattered around the code. This branch gets rid of GTimeVal but does not bump the glib min version to 2.68 as we will need to add further changes to be warning free on 2.68

no news needed

@bazsi
Copy link
Collaborator Author

bazsi commented Dec 7, 2023

this is an alternative to #4479

@kira-syslogng
Copy link
Contributor

Build FAILURE

@bazsi bazsi force-pushed the upgrade-glib-min-version-to-2-68 branch from fdb0ac5 to faf59e1 Compare December 7, 2023 03:59
@kira-syslogng
Copy link
Contributor

Build FAILURE

@kira-syslogng
Copy link
Contributor

Build FAILURE

@bazsi bazsi changed the title Upgrade glib min version to 2 68 Avoid using the deprecated GTimeVal type Dec 7, 2023
@bazsi
Copy link
Collaborator Author

bazsi commented Dec 7, 2023

@kira-syslogng retest this please;

@bazsi bazsi force-pushed the upgrade-glib-min-version-to-2-68 branch from 650dbbc to 0d454e8 Compare December 7, 2023 11:42
@kira-syslogng
Copy link
Contributor

Build FAILURE

@bazsi bazsi force-pushed the upgrade-glib-min-version-to-2-68 branch 2 times, most recently from e4ffb76 to 78daa4b Compare December 8, 2023 23:06
@kira-syslogng
Copy link
Contributor

Build FAILURE

@bazsi bazsi force-pushed the upgrade-glib-min-version-to-2-68 branch from 78daa4b to 2547ec3 Compare December 9, 2023 07:26
@kira-syslogng
Copy link
Contributor

Build FAILURE

@bazsi bazsi force-pushed the upgrade-glib-min-version-to-2-68 branch from 2547ec3 to 9b989f7 Compare December 9, 2023 11:05
@kira-syslogng
Copy link
Contributor

Build FAILURE

@bazsi bazsi force-pushed the upgrade-glib-min-version-to-2-68 branch from 9b989f7 to 57d5a1e Compare December 9, 2023 12:41
@kira-syslogng
Copy link
Contributor

Build FAILURE

@bazsi bazsi force-pushed the upgrade-glib-min-version-to-2-68 branch 2 times, most recently from 1a39fb8 to 6a87f07 Compare December 9, 2023 14:11
This function is actually a cache and we will need this in a subsequent
patch from within cache.c.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
… code

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
We are using iv_now to track the current monotonic time which requires the
initialization of ivykis from all threads. This is true for all production
threads for syslog-ng, but may not be for test programs etc.

This patch adds iv_init()/deinit() calls to these cases.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
The dnscache is using time for internal purposes, which is better of
using  the ivykis provided iv_now which tracks CLOCK_MONOTONIC rather
than REALTIME.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Note that previously the rate-limiting was slightly more accurate as
it queried an accurate time for every invocation. This is now using a
cached time, but that should be fine for a rate limit.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
@bazsi bazsi force-pushed the upgrade-glib-min-version-to-2-68 branch from 6a87f07 to bbbf8e7 Compare January 5, 2024 13:50
@alltilla alltilla assigned alltilla and unassigned alltilla Jan 8, 2024
@alltilla alltilla self-requested a review January 8, 2024 12:23
@alltilla
Copy link
Collaborator

alltilla commented Jan 8, 2024

@kira-syslogng do stresstest

@kira-syslogng
Copy link
Contributor

Kira-stress-test: Build FAILURE

Copy link
Collaborator

@alltilla alltilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve, but it would be nice to see the KIRA stress test results. It fails because of an environment error, I have written a message about it on the Discord.

@alltilla alltilla added this to the syslog-ng 4.6 milestone Jan 9, 2024
@bazsi bazsi merged commit d767542 into syslog-ng:master Jan 9, 2024
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants