Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Keran Yang <[email protected]>
  • Loading branch information
KeranYang committed Jan 13, 2025
1 parent 88ab707 commit 324aec0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 59 deletions.
15 changes: 0 additions & 15 deletions pkg/shared/util/struct.go

This file was deleted.

41 changes: 0 additions & 41 deletions pkg/shared/util/struct_test.go

This file was deleted.

5 changes: 2 additions & 3 deletions pkg/sources/generator/tickgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (
dfv1 "github.com/numaproj/numaflow/pkg/apis/numaflow/v1alpha1"
"github.com/numaproj/numaflow/pkg/isb"
"github.com/numaproj/numaflow/pkg/shared/logging"
"github.com/numaproj/numaflow/pkg/shared/util"
"github.com/numaproj/numaflow/pkg/sources/sourcer"
)

Expand Down Expand Up @@ -198,11 +197,11 @@ loop:
// since the Read call is blocking, and runs in an infinite loop,
// we implement Read With Wait semantics
select {
case r := <-mg.srcChan:
case r, ok := <-mg.srcChan:
// when the channel is closed and empty, go will still read from the channel once and return the zero value.
// exclude the zero value from being passed to the next vertex,
// ensuring all messages produced by generator follow the same data schema.
if util.IsZeroStruct(r) {
if !ok {
mg.logger.Info("Zero value read from the generator channel, skipping...")
continue
}
Expand Down

0 comments on commit 324aec0

Please sign in to comment.