Closed Bug 1672956 Opened 4 years ago Closed 4 years ago

Where should the RLB clear the "dirty_flag"?

Categories

(Data Platform and Tools :: Glean: SDK, task, P3)

task

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Dexter, Unassigned)

References

Details

(Whiteboard: [telemetry:fog:m7])

Kotlin and ios do this when entering foreground again, after being moved to background. That works because, in the mobile case, we want to track the case of being killed while in background.

On desktop we might want to tackle this differently: what about setting the flag to true right after init and clearing it at shutdown?

Flags: needinfo?(jrediger)
Flags: needinfo?(chutten)

Sounds good to me. At present FOG doesn't have much at-shutdown code, but it'll need some at some point.

Putting a pin in here to remember that, due to lazy idle startup task scheduling we might not be able to count on shutdown happening after init, so we'll need to keep some state around. A small Atomic<bool> gHasAlreadyShutdown in FOG.cpp ought to do the trick.

Flags: needinfo?(chutten)

There's an open bug for a shutdown API for Glean itself. Put it in "see also", but that might actually be a "depends on"

Flags: needinfo?(jrediger)
See Also: → 1647348
Whiteboard: [telemetry:glean-rs:m?][telemetry:fog:m6] → [telemetry:fog:m6]
Whiteboard: [telemetry:fog:m6] → [telemetry:fog:m7]

This is covered the client activity API and the RLB shutdown API, both now used by FOG.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.