Skip to content

Comments Migration

The 2026-09-25 release moves card comments out of the nodes collection into their own comments collection. This page describes what the migration does, how long to allow, and how to check its progress.

The migration runs once, the first time you start a release dated 2026-09-25 or later on a database from an earlier release. You do not start it yourself.

Before you upgrade

  1. Back up the Mongo database. Earlier releases cannot read the moved comments, so the only way to downgrade is to restore this backup.
  2. Plan the upgrade outside business hours.
  3. Count your comments, so you know the size of the job. Connect to Mongo, open the database that holds the Board nodes, then run:

    // comments to move
    db.nodes.countDocuments({ type: 'comment' })
    
    // archived comments, which the migration deletes
    db.nodes.countDocuments({ type: 'comment', deleted: true })
    

    Keep both numbers. You use them to confirm the result.

  4. Check that Mongo has free disk space for a second copy of your comments. Both copies exist until the migration deletes the originals.

  5. Upgrade every Boards service to the same image tag at the same time. See the release notes.

What the migration does

The migration starts in the background when the app service starts. Boards stays available while it runs. If you run more than one app pod, one pod does the work and the others wait for it.

  1. It copies every comment from nodes into comments. Each comment keeps its ID.
  2. It deletes the copied comments from nodes, in batches of 5,000. It deletes a comment only after it has confirmed the copy exists.
  3. It repeats steps 1 and 2 until no comments are left in nodes. A second pass is needed only when a pod from the earlier release wrote a comment during the first pass.
  4. It marks as orphaned any card that sat under a comment. Only cards imported from HCL Connections Activities can be in this position. These cards then show in the Board's archive view only.
  5. It deletes the comments that were archived before the upgrade. Boards has never shown these comments to users.
  6. It converts comment text that HCL Connections Activities stored in binary form to plain text.

A separate step updates reactions. It renames the field that links a reaction to its comment, removes duplicate reactions, and rebuilds the index.

What users see

  • Until the migration reaches a comment, that comment does not show on its card. It shows again once it is copied.
  • An edit to a comment can be lost if a pod from the earlier release saves it while the migration runs. This is why we ask you to upgrade outside business hours and to upgrade all services together.
  • Boards can be slower while the migration runs, because it adds load to Mongo.

How long it takes

The time depends on the number of comments, the Mongo hardware and the other load on Mongo. We cannot give a fixed figure. A database with hundreds of thousands of comments takes several minutes or more.

To get your own figure before the upgrade, restore a backup to a test environment and upgrade that first.

During the upgrade you can estimate the time left from the counts in Check progress in Mongo. Run a count, wait one minute, and run it again. The difference is the rate per minute.

On a replica set, the copy and the deletes also replicate to the secondaries, so expect some replication lag.

Warning

Do not restart, delete or scale down the app pods while the migration runs. No comment is lost if a pod stops, but the migration then waits up to one hour before it can start again.

Restart an app pod only after the migration has stopped by itself. See If the migration stops.

Check progress in the logs

The migration writes to the log of the app pod that runs it. If you run more than one app pod, check each one.

kubectl get pods -n <namespace> | grep app
kubectl logs -n <namespace> -f <app-pod-name>

These lines show in this order when all goes well:

Log line Meaning
comments-split: migrating <count> comments out of nodes The migration started.
comments-split: found <count> removed <count> All comments are copied and removed from nodes.
migration completed comments/split-out-of-nodes The move is recorded as complete.
comments-split: flagged orphaned child cards under comments Cards under comments are marked as orphaned.
comments-purge: deleted <count> archived comments Archived comments are deleted. This line shows only if there were any.
comment/binary-data - update complete. Binary comment text is converted. This line shows only if there was any.
migration completed comment/binary-data The last comment step is complete.
reactions: renamed nodeId on <count> reactions Reactions are updated. This line shows only if there were any.
migration completed reactions/dedupe-comment-reactions The last reaction step is complete.

The reaction lines can show before or between the comment lines, because the two run side by side.

This line is normal during a rolling upgrade. It means a pod from the earlier release wrote comments during a pass, and the migration is running another pass to collect them:

comments-split: pass <number> - <count> comments written during the pass, re-running

A database with no comments logs only the migration completed lines.

Check progress in Mongo

Connect to Mongo and open the database that holds the Board nodes.

// rises while comments are copied
db.comments.estimatedDocumentCount()

// stays level during the copy, then falls to 0 as the copied comments are deleted
db.nodes.countDocuments({ type: 'comment' })

// the work that is running now
db.currentOp({ active: true, ns: /\.(nodes|comments|reactions)$/ })

The count on nodes reads the whole collection, so it can take several seconds on a large database. Do not run it more than once a minute.

Confirm it is complete

Each finished step is recorded in the schemamigrations collection:

db.schemamigrations.find(
  { name: /^(comments?|reactions)\// },
  { name: 1, completed: 1, result: 1, edited: 1 }
)

The migration is complete when all six of these records show completed: true:

  • comments/split-out-of-nodes
  • comments/orphan-child-cards
  • comments/purge-archived
  • comment/binary-data
  • reactions/node-to-comment-id
  • reactions/dedupe-comment-reactions

The edited date on each record is the time that step finished. The result on comments/split-out-of-nodes holds the number of comments found and removed.

Each of these checks then returns 0:

db.nodes.countDocuments({ type: 'comment' })
db.comments.countDocuments({ deleted: true })
db.comments.countDocuments({ description: { $type: 5 } })
db.reactions.countDocuments({ nodeId: { $exists: true } })

The number of comments in comments is the number you counted before the upgrade, less the archived comments, plus any comments that users added since.

db.comments.countDocuments({})

If the migration stops

The migration is safe to run again. It deletes a comment from nodes only after the copy exists in comments, so a run that stops part-way loses no comments. The next run copies only what is missing.

What you see Cause What to do
comment migrations failed, followed by an error The migration hit an error, for example Mongo was unavailable. Fix the cause the error names, then restart one app pod.
comments still in nodes after 10 passes (old pods still writing?) - aborting Pods from the earlier release are still running and still writing comments to nodes. Check that every app pod runs the new image tag, then restart one app pod.
comment migrations: split not finished yet, leaving the follow-ups Another app pod is still moving comments, or an app pod stopped part-way through the move within the last hour. If another pod is still working, wait for it. If not, wait until one hour has passed since the migration started, then restart one app pod.
Reaction: error during boot migrations, followed by an error The reaction step hit an error. Restart one app pod. If the error returns, send it to support.
Error decoding document ID <id> One comment has binary text that cannot be converted. The migration skips it and continues. Send the ID to support. No other comment is affected.

Restart an app pod

A restart starts the migration again. Do this only when the table above tells you to, and only after you have confirmed that the migration is no longer running:

  1. No app pod has logged a comments-split line since the line that reported the problem.
  2. Both of these counts stay the same across two readings taken one minute apart. While the migration runs, the first count rises or the second count falls:

    db.comments.estimatedDocumentCount()
    db.nodes.countDocuments({ type: 'comment' })
    

If a new comments-split line shows or either count changes, the migration is still running. Leave the pods alone and wait.

Then delete one app pod. Kubernetes starts a new pod in its place, and the new pod starts the migration:

kubectl delete pod -n <namespace> <app-pod-name>

If the migration does not complete after a restart, send the app pod logs and the output of the schemamigrations query to support@huddo.com.

Downgrade

Earlier releases cannot read comments in the comments collection. To go back to an earlier release, restore the backup you took before the upgrade.