Skip to content

Releases: sebadob/hiqlite

hiqlite-v0.12.2

21 Dec 18:34
a2df0fe

Choose a tag to compare

Changes

It is now possible to trigger a backup manually via direct API POST request, with something like:

curl -i -XPOST -H 'X-API-SECRET: SuperSecureSecret1337' localhost:8200/backup

Apart from that, a small DX improvement was added. When debug_assertions are active, the prepared statements will always be compared to the given params. It will make sure that the amount of params accepted matches exactly the length of the amount of params given. Such a check existed before already, but if you had nullable params at the end of your query, these could slip through.

Bugfix

  • When no S3 config was given, the backup cron job was not started and no local backups were created.

hiqlite-v0.12.1

09 Dec 17:36
5373b1b

Choose a tag to compare

Tiny fix for hiqlite to improve quality of life and DX. The "wait for non-leader" during startup with an already initialized Raft will be skipped for single instance deployments. This makes startups immediate again.

v0.12.0

09 Dec 13:17
9db6a3c

Choose a tag to compare

Breaking

The shutdown_delay_millis config option was removed. It is not necessary to set it manually anymore. Instead, more automatic detection is being applied and a necessary delay to smooth out rolling releases or make sure the readiness of a container is being caught is added without the need for additional config.

Apart from that, lots of improvements have been made to rolling releases and how WebSocket re-connects and node startups are being handled in general. There is a new /ready endpoint on the public API as well. It can be used in e.g. Kubernetes to smooth out rolling releases and detect a pod shutdown before it becomes unable to handle Raft requests. To do so, it is important however to not have too high periodSeconds, and the headless service needs to publishNotReadyAddresses ports before ready, like so:

apiVersion: v1
kind: Service
metadata:
  name: hiqlite-headless
  namespace: hiqlite
spec:
  clusterIP: None
  # only do that on the headless service
  publishNotReadyAddresses: true
  selector:
    app: hiqlite
  ports:
    - name: raft
      protocol: TCP
      port: 8100
      targetPort: 8100
    - name: api
      protocol: TCP
      port: 8200
      targetPort: 8200

Then you can make use of the new readiness check in the StatefulSet:

readinessProbe:
  httpGet:
    scheme: HTTP
    port: 8200
    path: /ready
  initialDelaySeconds: 5
  # Do not increase, otherwise a shutdown might start before k8s catches it.
  periodSeconds: 3
  # Require 2 failures because you may get one during a leader switch.
  failureThreshold: 2
livenessProbe:
  httpGet:
    scheme: HTTP
    port: 8200
    path: /health
    initialDelaySeconds: 60
    periodSeconds: 30
    # Require 2 failures because you may get one during a leader switch.
    failureThreshold: 2

Bugfix

The hiqlite-wal had a bug where the last_purged_log_id was overwritten with None during a log truncation, even if it had a value from a log purge before. If the node restarted before another log purge fixed it, it would result in an error during startup. The new version includes a check + fix, if you start up an instance with a data set that currently has this issue.

hiqlite-v0.11.1

01 Dec 09:59
a58d305

Choose a tag to compare

Bugfix when reading in the password_dashboard via TOML. The base64 decoding step was missing, while it was working just fine when read via ENV.

v0.11.0

11 Nov 12:57
4a65c94

Choose a tag to compare

This is a rather small release. Some external dependencies have been bumped to the latest versions. The biggest change is the pretty important bugfix below.

Bugfix

  • It was possible to get into situations where the automatic WAL file cleanup was not working as expected, even when the log IDs were covered by the latest snapshot. This could lead to the volume filling up endlessly.

hiqlite-v0.10.1

26 Aug 08:56
69e7d19

Choose a tag to compare

This version removes an unwrap() during KV GET operations, that was reachable under some circumstances, for instance when you cancel an async hiqlite::Client.get() before awaiting the result.

v0.10.0

12 Aug 08:27
1122cd2

Choose a tag to compare

This is a rather small release. The main thing about it is that rocksdb was removed completely after hiqlite-wal has proven to be stable. This makes hiqlite a lot more light-weight and makes it possible to compile it to musl targets.

Another noticeable change is that for HA deployments, the shutdown handler adds a 7 second pre-shutdown delay. After this delay, the cluster leave (for ephemeral caches) and shutdown procedures will be executed, followed by the already existing post-shutdown delay. This new 7 second pre-delay is not strictly necessary, but it makes rolling releases in e.g. K8s a lot smoother without the need for specific additional configuration for readiness probes and such, that can be messed up pretty easily. 7 additional seconds when doing a shutdown don't hurt and they would be necessary anyway to have a smooth restart.

Apart from that, internal dependencies like SQLite have been bumped and the Rust version was changed to 2024.

hiqlite-v0.9.1

07 Jul 11:39
3d35cdf

Choose a tag to compare

hiqlite v0.9.1

Fixed a bug for local backup cleanup. In some situations, the backup_keep_days_local config variable was not read
properly, and in addition, the path for the cleanup could end up wrong as well. This made it possible that the local
backup cleanup would not work at all in some situations.

v0.9.0

03 Jul 12:59
e5a7d1d

Choose a tag to compare

Changes

Non-Deterministic Functions Overwrite

Any form of hiqlite::Client::execute_* will panic!, if you use non-deterministic functions inside your DB modifying queries. These will always lead to inconsistency in a Raft cluster, if they are not re-written (which is a waste of resources imho), so they must never be used. This is not considered a breaking change, since they should not have been used anyway. This feature only acts as a safety-net.

List / Fetch Backups

It is now possible to list backups. For local ones, the hiqlite::Client provides the possibility to get a tokio::fs::File handle, while S3 backups can be streamed via a ChannelReceiver.

This version also changes the way that filenames for local backups are built. The timestamp for the filename will be the exact same for all local backups in a cluster. This makes downloading via a load balancer a lot easier.

v0.8.0

16 Jun 12:36
bc761e9

Choose a tag to compare

This is a rather small release. Mostly only breaking because of a small API change inside hiqlite-wal, which now can resolve all LockFile situations automatically. This means that for hiqlite, the config variable wal_ignore_lock has been removed. It's not needed anymore.

Apart from that, you get 2 new variables you can use to define the listen address for the API and Raft servers. This solves an issue in IPv6-only environments, and makes it possible to bind to a specific IP only instead of the default listening on all interfaces from before.

# You can set the listen addresses for both the API and Raft servers.
# These need to somewaht match the definition for the `nodes` above,
# with the difference, that a `node` address can be resolved via DNS,
# while the listen addresses must be IP addresses.
#
# The default for both of these is "0.0.0.0" which makes them listen
# on all interfaces.
# overwritten by: HQL_LISTEN_ADDR_API
listen_addr_api = "0.0.0.0"
# overwritten by: HQL_LISTEN_ADDR_RAFT
listen_addr_raft = "0.0.0.0"