Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Icb with ExperimentingService entity. #6661

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

ypodlesov
Copy link

Replace Immediate Controls Board (ICB) with ExperimentingService entity.
Remove unnecessary synchronization.

Copy link

Hi! Thank you for contributing!
The tests on this PR will run after a maintainer adds an ok-to-test label to this PR manually. Thank you for your patience!

@ypodlesov ypodlesov force-pushed the ypodlesov_dev branch 2 times, most recently from 06aa515 to 4eaf1e8 Compare July 14, 2024 18:59
Copy link
Member

@the-ancient-1 the-ancient-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Пока совсем не то что нужно

struct TExperimentingService : public TThrRefBase {
#define EXP_SERVICE_REG_SHARED(expService, name, value) \
if (!(expService).name.IsDefined()) { \
(expService).name = value; \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

параметры макросов нужно обязательно брать в скобки, иначе при подстановке может возникнуть какой-нибудь ужасный ужас, например если засунуть в макрос

int var = 3;
#define MACRO(value) var = value;
int main() {
    int y = 0;
    MACRO(0; y=5);
    return y;
}

Скобки не панацея но лучше чем ничего

value = (expService).name; \
}

#define EXP_SERVICE_REG_LOCAL(expService, name, value) \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вообще, важнее чем вопрос скобок - вопрос, а зачем вообще тут нужны макросы?

Почему это сделано так, а не в виде метода нового класса

TMyWrapper DataShardControlsDisableByKeyFilter;

или производного от TControlWrapper например?

Почему не переместить назначение дефолтного значения прямо в конструктор?
вот так:

TMyWrapper DataShardControlsDisableByKeyFilter(100500);

Так вообще не нужным станет
#define EXP_SERVICE_REG_SHARED

TControlWrapper SchemeShardAllowDataColumnForIndexTable{nullptr};
TControlWrapper SchemeShardAllowServerlessStorageBilling{nullptr};
};

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Главное чего тут не случилось - тут нет метода, позволяющего получить по имени элемент, это означает, что отвалится централизованное управление кластером. То есть то ради чего все и нужно.

@ypodlesov ypodlesov force-pushed the ypodlesov_dev branch 8 times, most recently from f0626d4 to 1e96993 Compare July 16, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants