Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
3AceShowHand committed Oct 26, 2023
1 parent 42eebf2 commit 4305ebd
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion cdc/owner/changefeed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,6 @@ func testChangefeedReleaseResource(
CfID: cf.id,
Type: model.AdminRemove,
})

cf.isReleased = false
// changefeed tick will release resources
cf.Tick(ctx, state.Info, state.Status, captures)
Expand Down
2 changes: 1 addition & 1 deletion cdc/redo/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ func (m *logManager) close() {
atomic.StoreInt32(&m.closed, 1)

m.logBuffer.CloseAndDrain()
if err := m.writer.Close(); err != nil {
if err := m.writer.Close(); err != nil && errors.Cause(err) != context.Canceled {
log.Error("redo manager fails to close writer",
zap.String("namespace", m.cfg.ChangeFeedID.Namespace),
zap.String("changefeed", m.cfg.ChangeFeedID.ID),
Expand Down
2 changes: 1 addition & 1 deletion cdc/redo/writer/memory/encoding_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func newEncodingWorkerGroup(workerNum int) *encodingWorkerGroup {
func (e *encodingWorkerGroup) Run(ctx context.Context) (err error) {
defer func() {
close(e.closed)
if err != nil {
if err != nil && errors.Cause(err) != context.Canceled {
log.Warn("redo fileWorkerGroup closed with error", zap.Error(err))
}
}()
Expand Down
2 changes: 1 addition & 1 deletion cdc/redo/writer/memory/file_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func (f *fileWorkerGroup) Run(
) (err error) {
defer func() {
f.close()
if err != nil {
if err != nil && errors.Cause(err) != context.Canceled {
log.Warn("redo file workers closed with error", zap.Error(err))
}
}()
Expand Down
3 changes: 1 addition & 2 deletions pkg/redo/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,7 @@ func ValidateStorage(uri *url.URL) error {
_, err := initExternalStorageForTest(ctx, *uri)
return err
}

// todo: the default dir mode is set as 755, is this ok?

err := os.MkdirAll(uri.Path, DefaultDirMode)
if err != nil {
return errors.WrapError(errors.ErrStorageInitialize, errors.Annotate(err,
Expand Down

0 comments on commit 4305ebd

Please sign in to comment.