diff options
| author | Chris Lu <chris.lu@uber.com> | 2019-03-30 23:08:29 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@uber.com> | 2019-03-30 23:08:29 -0700 |
| commit | 97406333a5ecc5b0d2cdaa74ff9901e3100e4bf2 (patch) | |
| tree | 04cb10ddb0fb87663ba1783a7e82397aa2c9c06f /weed/filer2/filer.go | |
| parent | 920b4e56aa76fbf37780363d5b345c2882d311b5 (diff) | |
| download | seaweedfs-97406333a5ecc5b0d2cdaa74ff9901e3100e4bf2.tar.xz seaweedfs-97406333a5ecc5b0d2cdaa74ff9901e3100e4bf2.zip | |
support atomic renaming for mysql/postgres filer store
Diffstat (limited to 'weed/filer2/filer.go')
| -rw-r--r-- | weed/filer2/filer.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/weed/filer2/filer.go b/weed/filer2/filer.go index 4220e24d3..06c26abb4 100644 --- a/weed/filer2/filer.go +++ b/weed/filer2/filer.go @@ -57,6 +57,18 @@ func (fs *Filer) KeepConnectedToMaster() { fs.MasterClient.KeepConnectedToMaster() } +func (f *Filer) BeginTransaction(ctx context.Context) (context.Context, error) { + return f.store.BeginTransaction(ctx) +} + +func (f *Filer) CommitTransaction(ctx context.Context) error { + return f.store.CommitTransaction(ctx) +} + +func (f *Filer) RollbackTransaction(ctx context.Context) error { + return f.store.RollbackTransaction(ctx) +} + func (f *Filer) CreateEntry(ctx context.Context, entry *Entry) error { if string(entry.FullPath) == "/" { |
