Skip to content

Commit

Permalink
sidecar: disable WithTemporaryBatchSize option
Browse files Browse the repository at this point in the history
  • Loading branch information
absorbb committed Dec 4, 2024
1 parent 8281314 commit 4841ade
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions bulkerlib/implementations/sql/snowflake.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,7 @@ func (s *Snowflake) GetTableSchema(ctx context.Context, namespace string, tableN

primaryKeyName, pkFields, err := s.getPrimaryKey(ctx, namespace, tableName)
if err != nil {
s.Errorf("failed to get primary key for table %s: %v", tableName, err)
//return nil, err
return nil, err
}

table.PKFields = pkFields
Expand Down
7 changes: 3 additions & 4 deletions sync-sidecar/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"errors"
"fmt"
bulker "github.com/jitsucom/bulker/bulkerlib"
"github.com/jitsucom/bulker/bulkerlib/implementations/sql"
"github.com/jitsucom/bulker/eventslog"
"github.com/jitsucom/bulker/jitsubase/jsonorder"
"github.com/jitsucom/bulker/jitsubase/pg"
Expand Down Expand Up @@ -444,9 +443,9 @@ func (s *ReadSideCar) openStream(streamName string) (*ActiveStream, error) {
} else if len(str.DefaultCursorField) > 0 {
streamOptions = append(streamOptions, bulker.WithDiscriminatorField(str.DefaultCursorField))
}
if str.SyncMode != "incremental" || forceTemporaryBatchesSources.Contains(s.packageName) {
streamOptions = append(streamOptions, sql.WithTemporaryBatchSize(100000))
}
//if str.SyncMode != "incremental" || forceTemporaryBatchesSources.Contains(s.packageName) {
// streamOptions = append(streamOptions, sql.WithTemporaryBatchSize(100000))
//}
if namespace != "" {
streamOptions = append(streamOptions, bulker.WithNamespace(namespace))
}
Expand Down

0 comments on commit 4841ade

Please sign in to comment.