diff options
| author | chrislusf <chris.lu@gmail.com> | 2016-04-15 11:56:53 -0700 |
|---|---|---|
| committer | chrislusf <chris.lu@gmail.com> | 2016-04-15 11:56:53 -0700 |
| commit | b03e7b26b53c2c579ae13755c3fac47f67c6f40c (patch) | |
| tree | e02bc29295ee90f5a9f33065175baa54353ed55b /go/storage/needle.go | |
| parent | 3fb98a904bf5d67e7f51797fbee0aa7ddffb5903 (diff) | |
| download | seaweedfs-b03e7b26b53c2c579ae13755c3fac47f67c6f40c.tar.xz seaweedfs-b03e7b26b53c2c579ae13755c3fac47f67c6f40c.zip | |
add []byte caching and pooling
fixes https://github.com/chrislusf/seaweedfs/issues/211
Diffstat (limited to 'go/storage/needle.go')
| -rw-r--r-- | go/storage/needle.go | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/go/storage/needle.go b/go/storage/needle.go index 612a89fed..8ab76c0f3 100644 --- a/go/storage/needle.go +++ b/go/storage/needle.go @@ -13,7 +13,6 @@ import ( "github.com/chrislusf/seaweedfs/go/glog" "github.com/chrislusf/seaweedfs/go/images" "github.com/chrislusf/seaweedfs/go/operation" - "github.com/chrislusf/seaweedfs/go/util" ) const ( @@ -23,14 +22,6 @@ const ( MaxPossibleVolumeSize = 4 * 1024 * 1024 * 1024 * 8 ) -var ( - BYTESPOOL *util.BytesPool -) - -func init() { - BYTESPOOL = util.NewBytesPool() -} - /* * A Needle means a uploaded and stored file. * Needle file size is limited to 4GB for now. @@ -53,7 +44,7 @@ type Needle struct { Checksum CRC `comment:"CRC32 to check integrity"` Padding []byte `comment:"Aligned to 8 bytes"` - rawBytes []byte // underlying supporing []byte, fetched and released into a pool + rawBlock *Block // underlying supporing []byte, fetched and released into a pool } func (n *Needle) String() (str string) { |
