mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 04:57:24 +08:00
go fmt
This commit is contained in:
@@ -24,7 +24,7 @@ const (
|
||||
type Needle struct {
|
||||
Cookie Cookie `comment:"random number to mitigate brute force lookups"`
|
||||
Id NeedleId `comment:"needle id"`
|
||||
Size Size `comment:"sum of DataSize,Data,NameSize,Name,MimeSize,Mime"`
|
||||
Size Size `comment:"sum of DataSize,Data,NameSize,Name,MimeSize,Mime"`
|
||||
|
||||
DataSize uint32 `comment:"Data size"` //version2
|
||||
Data []byte `comment:"The actual file data"`
|
||||
|
@@ -18,7 +18,7 @@ const SectionalNeedleIdLimit = 1<<32 - 1
|
||||
type SectionalNeedleValue struct {
|
||||
Key SectionalNeedleId
|
||||
OffsetLower OffsetLower `comment:"Volume offset"` //since aligned to 8 bytes, range is 4G*8=32G
|
||||
Size Size `comment:"Size of the data portion"`
|
||||
Size Size `comment:"Size of the data portion"`
|
||||
}
|
||||
|
||||
type SectionalNeedleValueExtra struct {
|
||||
@@ -116,7 +116,7 @@ func (cs *CompactSection) deleteOverflowEntry(key SectionalNeedleId) {
|
||||
})
|
||||
if deleteCandidate != length && cs.overflow[deleteCandidate].Key == key {
|
||||
if cs.overflow[deleteCandidate].Size.IsValid() {
|
||||
cs.overflow[deleteCandidate].Size = - cs.overflow[deleteCandidate].Size
|
||||
cs.overflow[deleteCandidate].Size = -cs.overflow[deleteCandidate].Size
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ import (
|
||||
type NeedleValue struct {
|
||||
Key NeedleId
|
||||
Offset Offset `comment:"Volume offset"` //since aligned to 8 bytes, range is 4G*8=32G
|
||||
Size Size `comment:"Size of the data portion"`
|
||||
Size Size `comment:"Size of the data portion"`
|
||||
}
|
||||
|
||||
func (this NeedleValue) Less(than btree.Item) bool {
|
||||
|
@@ -18,7 +18,7 @@ func (s Size) IsDeleted() bool {
|
||||
return s < 0 || s == TombstoneFileSize
|
||||
}
|
||||
func (s Size) IsValid() bool {
|
||||
return s >0 && s != TombstoneFileSize
|
||||
return s > 0 && s != TombstoneFileSize
|
||||
}
|
||||
|
||||
type OffsetLower struct {
|
||||
|
Reference in New Issue
Block a user