mirror of https://github.com/ecmwf/eccodes.git
ECC-1898: Revert changes
This commit is contained in:
parent
3769fd7a64
commit
cae430a2c1
|
@ -137,8 +137,6 @@ static int create_accessor(grib_section* p, grib_action* act, grib_loader* h)
|
|||
if (x->name_space_ == NULL)
|
||||
x->name_space_ = act->name_space;
|
||||
|
||||
// TODO(maee): Make sure that the accessor is added to the trie
|
||||
|
||||
grib_context_log(p->h->context, GRIB_LOG_DEBUG, "alias: add only namespace: %s.%s",
|
||||
act->name_space, act->name);
|
||||
i = 0;
|
||||
|
@ -180,12 +178,19 @@ static int create_accessor(grib_section* p, grib_action* act, grib_loader* h)
|
|||
act->name_space, act->name, y->name_);
|
||||
/* printf("[%s %s]\n",y->all_names_[i], y->all_name_spaces_[i]); */
|
||||
|
||||
// ECC-1898: Remove accessor from cache
|
||||
grib_handle* hand = grib_handle_of_accessor(y);
|
||||
if (hand->use_trie && y->all_name_spaces_[i] != NULL && strcmp(y->name_, act->name) != 0) {
|
||||
int id = grib_hash_keys_get_id(hand->context->keys, act->name);
|
||||
hand->accessors[id] = NULL;
|
||||
}
|
||||
/*
|
||||
* ECC-1898: Remove accessor from cache
|
||||
* This workaround was disabled because it was causing problems with the unaliasing mars.step,
|
||||
* i.e., when unaliasing "mars.step" it also unaliases "step"
|
||||
*/
|
||||
|
||||
// TODO(maee): Implement a new hash function, which uses the name and the name_space as well
|
||||
|
||||
//grib_handle* hand = grib_handle_of_accessor(y);
|
||||
//if (hand->use_trie && y->all_name_spaces_[i] != NULL && strcmp(y->name_, act->name) != 0) {
|
||||
// int id = grib_hash_keys_get_id(hand->context->keys, act->name);
|
||||
// hand->accessors[id] = NULL;
|
||||
//}
|
||||
|
||||
while (i < MAX_ACCESSOR_NAMES - 1) {
|
||||
y->all_names_[i] = y->all_names_[i + 1];
|
||||
|
|
|
@ -276,7 +276,7 @@ if( HAVE_BUILD_TOOLS )
|
|||
grib_ecc-1764
|
||||
grib_ecc-1792
|
||||
grib_ecc-1806
|
||||
grib_ecc-1898
|
||||
#grib_ecc-1898
|
||||
grib_ecc-1907
|
||||
grib_ecc-1941
|
||||
grib_ecc-1942
|
||||
|
|
Loading…
Reference in New Issue