mgmt: fixed pull log #51

Merged
sb10q merged 1 commits from pca006132/artiq-zynq:log into master 2020-07-15 16:25:02 +08:00

Fixed pull log problem, now users can use aqctl_corelog to pull log.

The pull log would only accept one connection at a time, and would abort the previous connection when a new connection comes.

  1. It does not make sense to have two connections under this model, as the first connection that read the log would clear the buffer.
  2. Currently, the write_chunk function would success on the first write to the stream even if the connection was closed, so relying that to detect connection close would cause lost of log messages (as the buffer is immediately cleared after the write_chunk. Using flush is OK but that would decrease the throughput and potentially discard a lot of log messages during the flush operation as it might take a long time.
Fixed pull log problem, now users can use `aqctl_corelog` to pull log. The pull log would only accept one connection at a time, and would abort the previous connection when a new connection comes. 1. It does not make sense to have two connections under this model, as the first connection that read the log would clear the buffer. 2. Currently, the `write_chunk` function would success on the first write to the stream even if the connection was closed, so relying that to detect connection close would cause lost of log messages (as the buffer is immediately cleared after the `write_chunk`. Using `flush` is OK but that would decrease the throughput and potentially discard a lot of log messages during the flush operation as it might take a long time.
sb10q closed this pull request 2020-07-15 16:25:02 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/artiq-zynq#51
There is no content yet.