Skip to content

Commit

Permalink
fix(stream): add managed mode check (dgraph-io#1712)
Browse files Browse the repository at this point in the history
  • Loading branch information
NamanJain8 authored and fredcarle committed Aug 1, 2023
1 parent 661ccba commit e8bf93f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion stream_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,11 @@ func (w *sortedWriter) handleRequests() {
for i, e := range req.Entries {
// If badger is running in InMemory mode, len(req.Ptrs) == 0.
var vs y.ValueStruct
if e.skipVlogAndSetThreshold(w.db.valueThreshold()) {
// Sorted stream writer receives Key-Value (not a pointer to value). So, its upto the
// writer (and not the sender) to determine if the Value goes to vlog or stays in SST
// only. In managed mode, we do not write values to vlog and hence we would not have
// req.Ptrs initialized.
if w.db.opt.managedTxns || e.skipVlogAndSetThreshold(w.db.valueThreshold()) {
vs = y.ValueStruct{
Value: e.Value,
Meta: e.meta,
Expand Down

0 comments on commit e8bf93f

Please sign in to comment.