#25948 closed defect (implemented)

Run or_state_save as a mainloop event

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: 0.3.4.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: 034-roadmap-subtask, 034-triage-20180328, 034-included-20180328
Cc: Actual Points:
Parent ID: #25375 Points:
Reviewer: dgoulet Sponsor: Sponsor8-can

Description


Child Tickets

Change History (6)

comment:1 Changed 18 months ago by nickm

Status: assignedneeds_review

Implementation in ticket25948.

comment:2 Changed 18 months ago by dgoulet

Status: needs_reviewneeds_revision
+  } else if (BUG(next_write <= now)) {
+    return -1;

I guess this can happen if the clock jumped forward which will trigger the BUG() for a "valid" and recoverable use case no?

Also, we should use PERIODIC_EVENT_NO_UPDATE instead of -1.

comment:3 Changed 18 months ago by nickm

Status: needs_revisionneeds_review

I don't think that can happen: the next_write value is set by the or_state_save() function, which bases it on the value of "now" it takes as an argument.

I've added a fixup to use PERIODIC_EVENT_NO_UPDATE, and explain the rationale for using BUG()

comment:4 Changed 18 months ago by dgoulet

Reviewer: dgoulet

comment:5 Changed 18 months ago by dgoulet

Status: needs_reviewmerge_ready

Love it. lgtm;

comment:6 Changed 18 months ago by nickm

Resolution: implemented
Status: merge_readyclosed

Squashing and merging to master!

Note: See TracTickets for help on using tickets.