hundreds-father-404
02/10/2021, 7:38 PMRefCell<Option<String>>
for the thread_local!
static THREAD_PARENT_ID
, but we only use Option<String>
for the task_local!
static? I'd expect it to use RefCell
as well?
This goes back to https://github.com/pantsbuild/pants/pull/9071/files#diff-230c46e3890a73dee860295c27128ef3aadc239d2db0f6bcd1ac67db038385ef. It used to be a Mutex<Option<String>>
witty-crayon-22786
02/10/2021, 7:44 PMhundreds-father-404
02/10/2021, 7:45 PMwitty-crayon-22786
02/10/2021, 7:45 PMhundreds-father-404
02/10/2021, 7:49 PMWorkunitStore::increment_counter()
is working correctly. The store handle is present, and the counters hashmap is being incremented correctly
I'm trying to figure out why things aren't getting wired up correctly. For example, are we writing to the correct WorkunitStore?StoreWording nit, it'll help me if we can consistently call it a
WorkunitStore
. Store
is wired in my head to be the caching storewitty-crayon-22786
02/10/2021, 7:51 PMhundreds-father-404
02/10/2021, 7:52 PMthere is only one workunitstore per runGreat, I thought that was the case but was confused. Something I'm confused by, why aren't we using something like <Arc<Mutex>> for
WorkunitStore
?
#[derive(Clone)]
pub struct Context {
workunit_store: WorkunitStore,
build_id: String,
}
witty-crayon-22786
02/10/2021, 7:52 PMWorkunitStore
is internally reference counted… it’s something like Arc<Mutex<InnerWorkunitStore>>
hundreds-father-404
02/10/2021, 7:54 PMStore
the WorkunitStore
or the caching Store
?witty-crayon-22786
02/10/2021, 7:54 PMWorkunitStore
hundreds-father-404
02/10/2021, 7:56 PMWorkunitStore
. That's where I'm a little confused how to go about logging, where is the call for that read? Streaming workunits?witty-crayon-22786
02/10/2021, 7:57 PMhundreds-father-404
02/10/2021, 8:20 PMwitty-crayon-22786
02/10/2021, 8:20 PMhundreds-father-404
02/10/2021, 8:44 PMtime.sleep(4)
before self.run_tracker.end_run(engine_result)
in LocalPantsRunner
made a difference.
I'm suspecting somehow the write isn't going to the correct place? It's not an issue with lack of time, but location?witty-crayon-22786
02/10/2021, 8:57 PM779:pub struct WorkunitStoreHandle {
780- pub store: WorkunitStore,
781- pub parent_id: Option<SpanId>,
…the parent_id would be nonehundreds-father-404
02/10/2021, 9:06 PMwitty-crayon-22786
02/10/2021, 9:06 PMhundreds-father-404
02/10/2021, 9:08 PMself.executor.spawn(async move))
block. That is, I don't think has to do with race conditionsfast-nail-55400
02/10/2021, 11:52 PM