Sync specific outbound notefiles

Going through online docs note.add, there is a note on sync option

Tested this a bit manually with a DB and Outbound Queue notefiles, where I’d set "sync": true to one of the notes on the outbound queue. But the DB file would also get synced.
Is this the intended behavior? Are the guarantees only applying across the outbound queue notefiles?

Observing the file.changes.pending and trace logs, it appears that it syncs all of them, as soon after I submit a single note with "sync": true option on an outbound queue.

trace: sched,event,comm,sync,file,mem,checkpoint

The sensorevents.qos is the outbound queue notefile that I was looking to sync exclusively:

S82:15.81 sync: work to be done:
S82:15.82       upload-notebox
S82:15.82       upload _env.dbs
S82:15.82       upload _health.qo
S82:15.83 
S82:15.83       upload _log.qo
S82:15.83       upload _track.qo
S82:15.84       upload deviceconfig.dbs
S82:15.84       upload deviceevents.qos
S82:15.85       upload devicestatus.qos
S82:15.86       upload outputconfig.dbs
S82:15.86       upload sensorconfig.dbs
S82:15.87       upload sensorevents.qos
S82:15.88       download _env.dbs
S82:15.88       download deviceconfig.dbs
S82:15.88       download sensorconfig.dbs

Looking through related posts, I came across this:

So it’s not a guarantee? I just want to confirm so that I know which pieces of Notecard sync API are of a non-functional sort and not intended to provide a definable syncing behavior checkpoints.

Hey @Jakov ,

What I said in that previous thread is still accurate: in practice the sync flag on note.add is going to sync all outbound Notefile changes, but there are some edge cases where that might not be the case.

If you need to sync all outbound changes we encourage users to use the hub.sync request, and you can use the out flag if you only want to sync outbound changes {"req":"hub.sync","out":true}.

TJ

2 Likes