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

fix: execute "compact-series-file" at startup (1.x) #24260

Merged
merged 4 commits into from
Jun 1, 2023

Conversation

bnpfeife
Copy link
Contributor

@bnpfeife bnpfeife commented Jun 1, 2023

(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.

@bnpfeife bnpfeife added the 1.x label Jun 1, 2023
@bnpfeife bnpfeife self-assigned this Jun 1, 2023
Copy link
Contributor

@davidby-influx davidby-influx left a 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

echo "${BASH_REMATCH[1]}" ; return
fi
fi
done <<< "$(influxd config -config /etc/influxdb/influxdb.conf 2>/dev/null)"
Copy link
Contributor

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?

Copy link
Contributor Author

@bnpfeife bnpfeife Jun 1, 2023

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@davidby-influx davidby-influx left a 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.

scripts/influxd-systemd-start.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@davidby-influx davidby-influx left a comment

Choose a reason for hiding this comment

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

LGTM

@bnpfeife bnpfeife merged commit 44d4b1e into master-1.x Jun 1, 2023
9 checks passed
@bnpfeife bnpfeife deleted the BNP_compact-startup_1.x branch June 1, 2023 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants