Skip to content

Conversation

@vldpyatkov
Copy link
Contributor

No description provided.

@vldpyatkov vldpyatkov force-pushed the ignite-15492 branch 2 times, most recently from b06f486 to 4669592 Compare September 21, 2021 22:10
@NotNull ConfigurationNotificationEvent<SchemaView> schemasCtx) {
try {
((SchemaRegistryImpl)tables.get(ctx.newValue().name()).schemaRegistry()).
((SchemaRegistryImpl)tables.get(ctx.newValue().name()).schemaView()).
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you explain removing schemaRegistry method from AbstractTableView and replacing it by schemaView in TableImpl, which returns SchemaRegistrydespite of the name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because the schemaView method is weightily used in our code before.
The one reason by that another method (schemaRegistry) was written is Alexander did not know about it already exists.

schemaReg = new SchemaRegistryImpl(0, (v) -> schemaDesc);

schemaReg = new SchemaRegistryImpl(0, (v) -> schemaDesc, () -> INITIAL_SCHEMA_VERSION);
Copy link
Contributor

Choose a reason for hiding this comment

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

We have SchemaRegistryImpl.INITIAL_SCHEMA_VERSION = -1 and TableManager.INITIAL_SCHEMA_VERSION = 1 - is it ok?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both of these constant were added later than my patch.
I think not, but it is not my war).


assertNotNull(metaMngr);

WatchAggregator aggregator = (WatchAggregator) ReflectionUtils.tryToReadFieldValue(
Copy link
Contributor

Choose a reason for hiding this comment

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

Have we any plans and jira issues to remove this dirty reflection/mocking-based approach?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have the issue IGNITE-15723 to resolve this reference without any reflection mechanism (it is written couple line upper).
But I only move this code to use it into various tests, but the code of Inhibitor have been existing for a month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants