Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#19895 closed enhancement (fixed)

make CollecTor stop after RunOnce

Reported by: iwakeh Owned by: iwakeh
Priority: Medium Milestone: CollecTor 1.0.2
Component: Metrics/CollecTor Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


The activated modules are run one time, which is correct.
The configuration check thread just keeps running and thus CollecTor w/o doing anything.

Suggested behavior:
Exit CollecTor after all activated modules ran one time.

(related to #19894)

Child Tickets

Change History (7)

comment:1 Changed 4 years ago by iwakeh

Milestone: CollecTor 1.1.0

For release 1.1.0 as it is clearly visible in the log when it is save to terminate the jvm.

comment:2 Changed 4 years ago by iwakeh

Please review this commit (optimistically based on the implementation of the related task-19894).

comment:3 Changed 4 years ago by iwakeh

Status: newneeds_review

I was wondering why this didn't get attention, well, setting it to needs_review might help.

comment:4 Changed 4 years ago by karsten

Status: needs_reviewneeds_revision

Hmm, it seems that I'm running out of non-daemon threads now. Execution stops immediately after writing this log file:

$ cat collector-all.log 
2016-08-24 12:34:05,688 INFO o.t.c.cron.Scheduler:80 Single run for org.torproject.collector.relaydescs.ArchiveWriter.
2016-08-24 12:34:05,724 INFO o.t.c.cron.Scheduler:130 New Thread created: CollecTor-Scheduled-Thread-1

Here's my config file, as compared to defaults:

$ diff src/main/resources/ 
< RunOnce = false
> RunOnce = true
< RelaydescsActivated = false
> RelaydescsActivated = true
< DownloadRelayDescriptors = false
> DownloadRelayDescriptors = true

comment:5 Changed 4 years ago by iwakeh

Status: needs_revisionneeds_review

Good catch! Unfortunately this cannot be simulated using junit.

Please review one commit adapting the tests to the change in #19894 and the second commit correcting the run-once functionality.

comment:6 Changed 4 years ago by karsten

Resolution: fixed
Status: needs_reviewclosed

Rebased to master, tweaked some trivial whitespace issues, tested locally, and pushed to master. Closing, together with #19894. Thanks!

comment:7 Changed 4 years ago by iwakeh

Milestone: CollecTor 1.1.0CollecTor 1.0.2

Added to appropriate milestone.

Note: See TracTickets for help on using tickets.