mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
cleanup comments and no-op implementations
This commit is contained in:
parent
65219c65fc
commit
3a3f38759e
3 changed files with 2 additions and 27 deletions
6
api.go
6
api.go
|
|
@ -765,9 +765,7 @@ func (api *API) DeleteField(ctx context.Context, indexName string, fieldName str
|
|||
return nil
|
||||
}
|
||||
|
||||
// DeleteShard deletes a given shard in an index.
|
||||
// This is me taking a stab at implementing this logic, currently
|
||||
// a no-op implementation - DK
|
||||
// DeleteShard is currently a no-op implementation deletes a given shard in an index.
|
||||
func (api *API) DeleteShard(ctx context.Context, indexName string, shardID uint64) error {
|
||||
if err := api.validate(apiDeleteShard); err != nil {
|
||||
return errors.Wrap(err, "validating api method")
|
||||
|
|
@ -791,8 +789,6 @@ func (api *API) DeleteShard(ctx context.Context, indexName string, shardID uint6
|
|||
return errors.Wrapf(err, "deleting shard")
|
||||
}
|
||||
|
||||
// Since this is serverless, don't need to send to all nodes.
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -332,19 +332,8 @@ func (api *API) pushJobsTableKeys(ctx context.Context, jobs chan<- directiveJobT
|
|||
qtid := tkey.QualifiedTableID()
|
||||
for _, partition := range partitions {
|
||||
api.serverlessStorage.RemoveTableKeyResource(qtid, partition)
|
||||
// think about the holder as that's the local disk space
|
||||
// NOTE: index = table --> don't want to delete the whole index/table
|
||||
// maybe search via indexes in the translatestores in index.go?
|
||||
// FeatureBase storage has no concept of database or org, so when we create an index in
|
||||
// FeatureBase which maps to a qtbl, the name of that index is the TableKey,
|
||||
// which is made up of org/database/tableID
|
||||
|
||||
//maybe start with shards, since multiple shards belong to a partition
|
||||
api.Holder().Index(string(tkey)).TranslateStore(int(partition)) //.Delete(records *roaring.Bitmap)
|
||||
|
||||
// this implementation is going to be much more difficult
|
||||
|
||||
//implement this via no-op
|
||||
// currently a no-op implementation
|
||||
api.DeletePartition(ctx, string(qtid.Name), int(partition))
|
||||
}
|
||||
}
|
||||
|
|
@ -443,7 +432,6 @@ func (api *API) pushJobsFieldKeys(ctx context.Context, jobs chan<- directiveJobT
|
|||
api.serverlessStorage.RemoveFieldKeyResource(qtid, field)
|
||||
|
||||
// Attempt at implementing deletion from disk -- DK
|
||||
// deleting field from disk
|
||||
err := api.DeleteField(ctx, string(tkey), string(field))
|
||||
if err != nil {
|
||||
errors.Wrapf(err, "error deleting field")
|
||||
|
|
|
|||
9
index.go
9
index.go
|
|
@ -1020,15 +1020,6 @@ func (i *Index) DeleteField(name string) error {
|
|||
// This is currently a no-op implementation
|
||||
func (i *Index) DeleteShard(ctx context.Context, indexName string, shardID uint64) error {
|
||||
|
||||
// Delete shard
|
||||
// --> need to make schemator DeleteShard too?
|
||||
// --> --> --> The real question is where to actually delete the shard? and how? Through fields? Views?
|
||||
// --> --> shards and partitions aren't part of schema?
|
||||
// ???
|
||||
|
||||
i.holder.txf.DeleteShardFromStore(indexName, shardID)
|
||||
// profit
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue