This commit is contained in:
chrislu
2022-09-14 23:06:44 -07:00
parent c8645fd232
commit 21c0587900
45 changed files with 730 additions and 694 deletions

View File

@@ -1,9 +1,7 @@
/*
Package elastic is for elastic filer store.
The referenced "github.com/olivere/elastic/v7" library is too big when compiled.
So this is only compiled in "make full_install".
*/
package elastic

View File

@@ -80,9 +80,9 @@ func (f *Filer) LoadFilerConf() {
f.FilerConf = fc
}
////////////////////////////////////
// //////////////////////////////////
// load and maintain remote storages
////////////////////////////////////
// //////////////////////////////////
func (f *Filer) LoadRemoteStorageConfAndMapping() {
if err := f.RemoteStorage.LoadRemoteStorageConfigurationsAndMapping(f); err != nil {
glog.Errorf("read remote conf and mapping: %v", err)

View File

@@ -63,7 +63,7 @@ func (store *PostgresStore2) initialize(createTable, upsertQuery string, enableU
sqlUrl += " host=" + hostname
}
if port != 0 {
sqlUrl += " port=" + strconv.Itoa(port)
sqlUrl += " port=" + strconv.Itoa(port)
}
if sslmode != "" {
sqlUrl += " sslmode=" + sslmode

View File

@@ -198,36 +198,45 @@ func (nl *ItemList) WriteName(name string) error {
/*
// case 1: exists in nextNode
if nextNode != nil && nextNode.Key == name {
remove from nextNode, update nextNode
// TODO: merge with prevNode if possible?
return
}
if nextNode != nil && nextNode.Key == name {
remove from nextNode, update nextNode
// TODO: merge with prevNode if possible?
return
}
if nextNode is nil
prevNode = list.Largestnode
if prevNode == nil and nextNode.Prev != nil
prevNode = load(nextNode.Prev)
// case 2: does not exist
// case 2.1
if prevNode == nil {
return
}
if prevNode == nil {
return
}
// case 2.2
if prevNameBatch does not contain name {
return
}
if prevNameBatch does not contain name {
return
}
// case 3
delete from prevNameBatch
if prevNameBatch + nextNode < capacityList
// case 3.1
merge
else
// case 3.2
update prevNode
*/
func (nl *ItemList) DeleteName(name string) error {
lookupKey := []byte(name)

View File

@@ -1,9 +1,7 @@
/*
Package sqlite is for sqlite filer store.
The referenced "modernc.org/sqlite" library is too big when compiled.
So this is only compiled in "make full_install".
*/
package sqlite

View File

@@ -1,9 +1,7 @@
/*
Package ydb is for YDB filer store.
The referenced "github.com/ydb-platform/ydb-go-sdk/v3" library is too big when compiled.
So this is only compiled in "make full_install".
*/
package ydb