-
Notifications
You must be signed in to change notification settings - Fork 340
add fd cache #164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add fd cache #164
Conversation
datafile_test.go
Outdated
|
||
if err == nil { | ||
t.Error("err invalid argument") | ||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?where did this err come from
fd_manager.go
Outdated
func newFdm(maxFdNums int, cleanThreshold float64) (fdm *fdManager) { | ||
fdm = &fdManager{ | ||
cache: map[string]*FdInfo{}, | ||
fdList: initList(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initdoubleLinkedList ?
fd_manager.go
Outdated
for node != nil && node != fdm.fdList.head && cleanNums > 0 { | ||
nextItem := node.prev | ||
if node.using == 0 { | ||
fdm.fdList.remoteNode(node) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removeNode?
fd_manager.go
Outdated
cache map[string]*FdInfo | ||
fdList *doubleLinkedList | ||
size int | ||
cleanThreshold int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cleanThresholdNum?
@@ -28,6 +28,7 @@ func (suite *TxBucketTestSuite) SetupSuite() { | |||
} | |||
} | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
fix issue: #159