Engineering

What is a hotfix? Meaning, hotfix vs patch, how to ship one

6 min read

A hotfix is a fix for a serious problem in production, shipped outside the normal release cycle because waiting for the next planned release would cost more than the risk of moving fast. It is small by design, it goes through a shortened version of the usual checks, and users hear about it as soon as they can get it. The word first meant a change applied to a “hot” system, a server still serving users, and today it describes urgency more than the way the fix is installed.

TermWhat it isWhen it shipsTypical scope
HotfixAn urgent fix for a problem users are hitting nowAs soon as it is ready, outside the scheduleOne defect
BugfixAny fix for a defectUsually with the next planned releaseOne or more defects
PatchAn update to existing software; in SemVer, a release that bumps the last numberPlanned or urgentBackward compatible fixes
Service pack or rollupA tested, cumulative bundle of earlier fixesOn a scheduleMany fixes, sometimes small features
Live patchA fix applied to running code without a restartWhen a restart is too costlyA few functions

What does hotfix mean in software?

A hotfix is a change made quickly to fix a problem in software that is already in use, released on its own instead of waiting for the next version. The term carries two ideas at once: the problem is serious, and the normal process has been shortened to deal with it.

Wikipedia’s hotfix article traces the shift. The term originally referred to patching a hot system, a production server actively serving clients, and over time it came to mean any update created with urgency or released outside the normal update cycle. Microsoft used the word for years and has since moved to other terminology, though its current list of update types still describes a service pack as a tested, cumulative set of hotfixes, security updates, critical updates and updates. The original “hot” sense lives on in live patching, which the Linux kernel’s livepatch documentation describes as fixing critical functions without a system reboot.

What is the difference between a hotfix and a patch?

A patch is any update that changes existing software, and a hotfix is a patch defined by its urgency and timing. Every hotfix is a patch; most patches are planned and ship with a regular release.

The overlap with versioning causes most of the confusion. Under Semantic Versioning, the PATCH number goes up when you make backward compatible bug fixes, so a hotfix to version 2.4.0 normally ships as 2.4.1. A planned maintenance release can be 2.4.1 too. The version number records what kind of change it is, and the word hotfix records why it could not wait. A bugfix is the same kind of change on a normal schedule: the code may be identical, and the difference is whether you broke the release cycle to ship it.

When does a bug deserve a hotfix?

When the cost of leaving it in production until the next release is higher than the risk of shipping a rushed change. That judgment should be made by a named person against criteria the team agreed in calm conditions, not by whoever is most alarmed.

Problems that usually justify a hotfix:

  • Data loss or corruption, including data written wrongly that will need cleaning up later.
  • A security vulnerability that is exploited or easy to exploit.
  • A core flow broken for many users: signing in, paying, saving work.
  • A regression from the latest release that blocks customers who were fine the day before.
  • A legal or contractual obligation the software has stopped meeting.

Problems that can usually wait for the next release: cosmetic issues, bugs with a reasonable workaround, and anything that affects few users and is not getting worse. Writing the list down matters because every urgent fix bypasses some of the checks that protect production, and a team that hotfixes everything has quietly abandoned its release process.

How do you ship a hotfix safely?

Fix the version that is actually running, change as little as possible, test the fix on the exact build you will deploy, keep a way back, and merge the fix into the main line so the next release does not bring the bug back.

  1. Confirm and scope. Reproduce the problem, confirm it meets the criteria above and name one owner for the fix.
  2. Branch from what is in production. In the git-flow model from Vincent Driessen’s branching model article, a hotfix branch starts from the production tag on master, the version is bumped immediately, and the finished branch merges back into both master and develop. Driessen’s own 2020 note on that article recommends a simpler flow for continuously delivered web apps, and there the hotfix is a small pull request on the main branch, deployed straight away.
  3. Make the smallest change that fixes it. No refactoring and no extra features. Anything that is not the fix can ship next week.
  4. Prove it. Add a test that reproduces the bug and fails without the fix, then run the full suite on the commit you will deploy.
  5. Version and tag. Bump the patch number and tag the commit, as described in git tags and releases.
  6. Deploy with a way back. Roll out gradually where you can, watch error rates, and know the rollback command before you need it.
  7. Merge back. If the fix was made on a release branch, merge it into the main line the same day.

Does a hotfix need a changelog entry and release notes?

Yes. The users who hit the bug need to know it is fixed and what, if anything, they must do, and anyone reading the version history later needs to know why a 2.4.1 exists two days after 2.4.0.

Keep the note short: what was broken, who was affected, what changes for them and which version contains the fix. When the hotfix answers an incident, the guidance in emergency release notes applies, and for a routine fix the format in bug fix release notes is enough. If your pipeline blocks merges without a changelog entry, the CI enforcement article explains how to handle urgent exceptions without switching the gate off. Changeloop drafts an entry from every merged pull request, so a hotfix PR gets a draft like any other merge, and a reviewer approves it before anything is published.

How do you stop hotfixes from becoming routine?

Count them and investigate each one. A hotfix is evidence that something reached production that the normal checks should have caught, and the count tells you whether that is getting better or worse.

DORA’s software delivery metrics include change fail rate, the ratio of deployments that require immediate intervention after they go out, likely resulting in a rollback or a hotfix. A rising rate usually points at releases that are too large or tests that miss whole areas of the product. After each hotfix, ask why the bug escaped and add the test, check or review step that would have stopped it. The release management process article covers where those checks sit in a normal release.

FAQ

Is a hotfix the same as a patch? Every hotfix is a patch, since it changes existing software. The word hotfix adds that the patch was urgent and shipped outside the normal release schedule.

What version number should a hotfix get? Usually the next patch version under Semantic Versioning, so a hotfix to 2.4.0 ships as 2.4.1. A hotfix should contain only backward compatible fixes, which is exactly what a patch increment promises.

Who decides whether a bug needs a hotfix? One named role, such as the on-call engineer or the release owner, using criteria the team wrote down in advance. Deciding by committee during an incident is slow, and deciding by whoever shouts loudest makes hotfixes routine.

Should a hotfix skip code review? No. Shorten the review, and keep it: a second person reading a ten-line change takes minutes and catches the typo that turns one incident into two.


The technical claims in this article have not been independently reviewed. If something here is wrong, tell us and we will correct it.

Related on Changeloop: Changelog generator, Release notes template

changeloop
The team building a closed-loop changelog. Your users ask, your team ships, the person who asked gets told.