@@ -124,10 +124,10 @@ func DefaultConfig() Config {
124124 PublishTimeout : 5 * time .Second ,
125125 PurgeInterval : 250 * time .Millisecond ,
126126 PurgeBatchSize : 500 ,
127- InsertBatchFlushInterval : 100 * time .Millisecond ,
127+ InsertBatchFlushInterval : 500 * time .Millisecond ,
128128 InsertBatchSize : 100 ,
129129 MarkBatchSize : 100 ,
130- MarkBatchFlushInterval : 100 * time .Millisecond ,
130+ MarkBatchFlushInterval : 500 * time .Millisecond ,
131131 MarkBatchWorkers : 2 ,
132132 // Metrics is opt-in: callers who want instrumentation must set this
133133 // and pass a metric.Meter to NewDurableEmitter.
@@ -654,13 +654,13 @@ func (d *DurableEmitter) insertBatchLoop() {
654654 for i , r := range batch {
655655 payloads [i ] = r .payload
656656 }
657- ctx , cancel := context .WithTimeout (context .Background (), d .cfg .PublishTimeout )
658- ids , batchErr := d .batchInserter .InsertBatch (ctx , payloads )
659- cancel ()
660- if batchErr == nil {
661- d .eng .Debugw ("DurableEmitter: coalesced insert flushed" , "count" , len (payloads ))
662- }
663- for i , r := range batch {
657+ ctx , cancel := context .WithTimeout (context .Background (), d .cfg .PublishTimeout )
658+ ids , batchErr := d .batchInserter .InsertBatch (ctx , payloads )
659+ cancel ()
660+ if batchErr == nil {
661+ d .eng .Debugw ("DurableEmitter: coalesced insert flushed" , "count" , len (payloads ))
662+ }
663+ for i , r := range batch {
664664 if batchErr != nil {
665665 r .result <- insertResult {err : batchErr }
666666 } else {
0 commit comments