-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
fix: execute "compact-series-file" at startup (1.x) #24260
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IS the config file location hard-coded here? Can it come from INFLUXD_OPTS
scripts/influxd-systemd-start.sh
Outdated
echo "${BASH_REMATCH[1]}" ; return | ||
fi | ||
fi | ||
done <<< "$(influxd config -config /etc/influxdb/influxdb.conf 2>/dev/null)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should /etc/influxdb/influxdb.conf
be a constant/parameter that we use here and in the actual command line, so they can't get out of sync?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The config is hard-coded on master-1.x
: scripts/influxd-systemd-start.sh
. I am unsure what supplying another -config <path>
via INFLUXD_OPTS
would do (override vs ignore vs error), but the behavior should be consistent with the call that starts the service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it, if -config
is supplied via INFLUXD_OPTS
, the first will be overridden in favor of INFLUXD_OPTS
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One change. LMK if I am misunderstanding something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
(From Issue Description:)
When the database is online for long periods and many deletes occur, the series files grow. Instead of deleting the series outright, a tombstone is written instead. We will execute influx_inspect buildtsi -compact-series-file at startup which should help alleviate this problem.