mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
fix(sdk): revert some modify for sdk.#22148104
Signed-off-by: baihailong <baihailong@oppo.com>
This commit is contained in:
parent
31ed67cb5e
commit
23d03a0592
@ -152,8 +152,8 @@ func NewExtentHandler(stream *Streamer, offset int, storeMode int, size int,
|
||||
|
||||
// String returns the string format of the extent handler.
|
||||
func (eh *ExtentHandler) String() string {
|
||||
return fmt.Sprintf("ExtentHandler{ID(%v)Inode(%v)FileOffset(%v)Size(%v)StoreMode(%v)Status(%v)Dp(%v)Ver(%v)key(%v)lastKey(%v)flight(%d)dirty(%v)storageClass(%v)inflight(%v)}",
|
||||
eh.id, eh.inode, eh.fileOffset, eh.size, eh.storeMode, eh.status, eh.dp, eh.stream.verSeq, eh.key, eh.lastKey, eh.inflight, eh.dirty, eh.storageClass, eh.inflight)
|
||||
return fmt.Sprintf("ExtentHandler{ID(%v)Inode(%v)FileOffset(%v)Size(%v)StoreMode(%v)Status(%v)Dp(%v)Ver(%v)key(%v)lastKey(%v)flight(%d)dirty(%v)storageClass(%v)inflight(%v)dirty(%v)}",
|
||||
eh.id, eh.inode, eh.fileOffset, eh.size, eh.storeMode, eh.status, eh.dp, eh.stream.verSeq, eh.key, eh.lastKey, eh.inflight, eh.dirty, eh.storageClass, eh.inflight, eh.dirty)
|
||||
}
|
||||
|
||||
func (eh *ExtentHandler) write(data []byte, offset, size int, direct bool) (ek *proto.ExtentKey, err error) {
|
||||
|
||||
@ -220,11 +220,13 @@ func (s *Streamer) server() {
|
||||
if s.refcnt <= 0 {
|
||||
if s.idle >= streamWriterIdleTimeoutPeriod && len(s.request) == 0 {
|
||||
if s.client.disableMetaCache || !s.needBCache {
|
||||
log.LogDebugf("done server: delete streamer(%v)", s)
|
||||
delete(s.client.streamers, s.inode)
|
||||
if s.client.evictIcache != nil {
|
||||
s.client.evictIcache(s.inode)
|
||||
}
|
||||
}
|
||||
s.isOpen = false
|
||||
// fail the remaining requests in such case
|
||||
s.clearRequests()
|
||||
s.client.streamerLock.Unlock()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user