hardlink works now

This commit is contained in:
Chris Lu
2020-09-24 03:06:44 -07:00
parent c7d7b1a0f6
commit 5e239afdfc
16 changed files with 882 additions and 461 deletions

View File

@@ -28,7 +28,7 @@ var (
)
type Filer struct {
Store *FilerStoreWrapper
Store VirtualFilerStore
MasterClient *wdclient.MasterClient
fileIdDeletionQueue *util.UnboundedQueue
GrpcDialOption grpc.DialOption
@@ -314,3 +314,11 @@ func (f *Filer) Shutdown() {
f.LocalMetaLogBuffer.Shutdown()
f.Store.Shutdown()
}
func (f *Filer) maybeDeleteHardLinks(hardLinkIds []HardLinkId) {
for _, hardLinkId := range hardLinkIds {
if err := f.Store.DeleteHardLink(context.Background(), hardLinkId); err != nil {
glog.Errorf("delete hard link id %d : %v", hardLinkId, err)
}
}
}