mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-06 03:57:48 +01:00
master can redirect GET/DELETE/POST requests to volume servers. So
clients does not always need to remember the volume server locations. This is good for low~medium sized web site traffic.
This commit is contained in:
1 parent
e9eb8949ba
commit
8fb8ebdf14
3 files changed
+25
-8
No files matched your search
@@ -57,7 +57,7 @@ func (t *Topology) loadConfiguration(configurationFile string) error {
|
||||
return e
|
||||
}
|
||||
|
||||
func (t *Topology) Lookup(vid storage.VolumeId) *[]*DataNode {
|
||||
func (t *Topology) Lookup(vid storage.VolumeId) []*DataNode {
|
||||
for _, vl := range t.replicaType2VolumeLayout {
|
||||
if vl != nil {
|
||||
if list := vl.Lookup(vid); list != nil {
|
||||
|
||||
@@ -42,8 +42,8 @@ func (vl *VolumeLayout) isWritable(v *storage.VolumeInfo) bool{
|
||||
return uint64(v.Size) < vl.volumeSizeLimit && v.Version == storage.CurrentVersion
|
||||
}
|
||||
|
||||
func (vl *VolumeLayout) Lookup(vid storage.VolumeId) *[]*DataNode {
|
||||
return &vl.vid2location[vid].list
|
||||
func (vl *VolumeLayout) Lookup(vid storage.VolumeId) []*DataNode {
|
||||
return vl.vid2location[vid].list
|
||||
}
|
||||
|
||||
func (vl *VolumeLayout) PickForWrite(count int) (*storage.VolumeId, int, *VolumeLocationList, error) {
|
||||
|
||||
Reference in new issue
Block a user