Skip to content

Commit b9b3eca

Browse files
Update charts/openobserve/templates/ingester-statefulset.yaml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ba767e3 commit b9b3eca

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

charts/openobserve/templates/ingester-statefulset.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,12 @@ spec:
145145
146146
# Flush all data from memory to WAL. This does not flush data from ingester to s3.
147147
echo "Flushing data from ingester..."
148-
curl -X PUT "http://localhost:{{ .Values.config.ZO_HTTP_PORT }}/node/flush" \
149-
-H "Authorization: Basic ${AUTH_HEADER}"
148+
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -X PUT "http://localhost:{{ .Values.config.ZO_HTTP_PORT }}/node/flush" \
149+
-H "Authorization: Basic ${AUTH_HEADER}")
150+
if [ "$RESPONSE" -ne 200 ]; then
151+
echo "Error: Failed to flush data from ingester. HTTP response code: $RESPONSE"
152+
exit 1
153+
fi
150154
151155
# returns 200 if successful and "true" if the node is flushed
152156

0 commit comments

Comments
 (0)