@@ -49,7 +49,6 @@ type Wrapper struct {
49
49
dagst dagstore.Interface
50
50
minerAPI MarketAPI
51
51
failureCh chan dagstore.ShardResult
52
- traceCh chan dagstore.Trace
53
52
gcInterval time.Duration
54
53
}
55
54
@@ -69,9 +68,6 @@ func NewDAGStore(ctx context.Context,
69
68
// The dagstore will write Shard failures to the `failureCh` here.
70
69
failureCh := make (chan dagstore.ShardResult , 1 )
71
70
72
- // The dagstore will write Trace events to the `traceCh` here.
73
- traceCh := make (chan dagstore.Trace , 32 )
74
-
75
71
var (
76
72
transientsDir = filepath .Join (cfg .RootDir , "transients" )
77
73
datastoreDir = filepath .Join (cfg .RootDir , "datastore" )
@@ -110,7 +106,6 @@ func NewDAGStore(ctx context.Context,
110
106
ShardRepo : shardRepo ,
111
107
MountRegistry : registry ,
112
108
FailureCh : failureCh ,
113
- TraceCh : traceCh ,
114
109
// not limiting fetches globally, as the Lotus mount does
115
110
// conditional throttling.
116
111
MaxConcurrentIndex : cfg .MaxConcurrentIndex ,
@@ -137,7 +132,6 @@ func NewDAGStore(ctx context.Context,
137
132
dagst : dagst ,
138
133
minerAPI : marketApi ,
139
134
failureCh : failureCh ,
140
- traceCh : traceCh ,
141
135
gcInterval : time .Duration (cfg .GCInterval ),
142
136
}
143
137
@@ -174,10 +168,6 @@ func (w *Wrapper) Start(ctx context.Context) error {
174
168
w .backgroundWg .Add (1 )
175
169
go w .gcLoop ()
176
170
177
- // run a go-routine to read the trace for debugging.
178
- w .backgroundWg .Add (1 )
179
- go w .traceLoop ()
180
-
181
171
// Run a go-routine for shard recovery
182
172
if dss , ok := w .dagst .(* dagstore.DAGStore ); ok {
183
173
w .backgroundWg .Add (1 )
@@ -187,24 +177,6 @@ func (w *Wrapper) Start(ctx context.Context) error {
187
177
return w .dagst .Start (ctx )
188
178
}
189
179
190
- func (w * Wrapper ) traceLoop () {
191
- defer w .backgroundWg .Done ()
192
-
193
- for w .ctx .Err () == nil {
194
- select {
195
- // Log trace events from the DAG store
196
- case tr := <- w .traceCh :
197
- log .Debugw ("trace" ,
198
- "shard-key" , tr .Key .String (),
199
- "op-type" , tr .Op .String (),
200
- "after" , tr .After .String ())
201
-
202
- case <- w .ctx .Done ():
203
- return
204
- }
205
- }
206
- }
207
-
208
180
func (w * Wrapper ) gcLoop () {
209
181
defer w .backgroundWg .Done ()
210
182
0 commit comments