[
https://issues.apache.org/jira/browse/HTRACE-237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14953662#comment-14953662
]
Colin Patrick McCabe commented on HTRACE-237:
---------------------------------------------
bq. Says HTracedBuffer in BufferManager... might be old name for the class?
Yeah, it should be BufferManager in that comment. Fixed.
bq. And regards the thread-safe comment, isn't it in the implementation where
you say if it is thread-safe or not? What is to stop me implementing a
thread-safe buffer?
I think the important thing is that BufferManager implementations doesn't need
to be thread-safe, because it's only ever called from a single-threaded
context. This way, we avoid the overhead of locking in places we don't need to
lock, and it's clear during code reviews that we don't need to worry about
multi-threading here.
bq. prepare in the buffermanager seems like TMI clear is reset... drop all
contents and start over?
Hmm. prepare and clear are similar, but I don't think they can be
consolidated. clear is something that just drops all the contents. prepare
lays out the data in memory prior to sending it on the wire.
bq. Conf needs explanation as to what it is especially given it is importing
HTraceConfiguration.
Added some JavaDoc
bq. You want to say anything in comment on why you have the two buffers, one
flushing while other is being written to?
Good idea. I added a comment to HTracedSpanReceiver.java
> Optimize htraced span receiver
> ------------------------------
>
> Key: HTRACE-237
> URL: https://issues.apache.org/jira/browse/HTRACE-237
> Project: HTrace
> Issue Type: Improvement
> Affects Versions: 4.1
> Reporter: Colin Patrick McCabe
> Assignee: Colin Patrick McCabe
> Attachments: HTRACE-237.001.patch, HTRACE-237.002.patch,
> HTRACE-237.003.patch, HTRACE-237.004.patch, HTRACE-237.006.patch
>
>
> Optimize htraced span receiver so that it supports double buffering and both
> the msgpack and REST transports.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)