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

IGNITE-19082: Catalog. Cleanup dead code #3669

Merged
merged 48 commits into from May 10, 2024
Merged

Conversation

lowka
Copy link
Contributor

@lowka lowka commented Apr 26, 2024

https://issues.apache.org/jira/browse/IGNITE-19082


Thank you for submitting the pull request.

To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:

The Review Checklist

  • Formal criteria: TC status, codestyle, mandatory documentation. Also make sure to complete the following:
    - There is a single JIRA ticket related to the pull request.
    - The web-link to the pull request is attached to the JIRA ticket.
    - The JIRA ticket has the Patch Available state.
    - The description of the JIRA ticket explains WHAT was made, WHY and HOW.
    - The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • Design: new code conforms with the design principles of the components it is added to.
  • Patch quality: patch cannot be split into smaller pieces, its size must be reasonable.
  • Code quality: code is clean and readable, necessary developer documentation is added if needed.
  • Tests code quality: test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.

Notes

@lowka lowka force-pushed the ignite-19082 branch 5 times, most recently from 600d20a to f965bd9 Compare April 26, 2024 12:32
await for catalog initialization i n system view manager.
@lowka
Copy link
Contributor Author

lowka commented May 8, 2024

what about this Let’s remove using/keeping schema name instaed of schema id (NewIndexEntry class as example)?

I have addressed this issue.

@lowka lowka requested a review from korlov42 May 9, 2024 06:54
@@ -49,18 +49,19 @@ public class NewColumnsEntry implements UpdateEntry, Fireable {

private final int tableId;
private final List<CatalogTableColumnDescriptor> descriptors;
private final String schemaName;
private final int schemaId;
Copy link
Contributor

Choose a reason for hiding this comment

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

I would delete schema at all because it creates ambiguity. It's better to derive schema from table (table descriptor has schemaId).

The same for rest of the updateEntries

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

fix serde.
removed schema id from new columns entry.
new CatalogTableDescriptor[0],
new CatalogIndexDescriptor[0],
new CatalogSystemViewDescriptor[0],
0
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
0
INITIAL_CAUSALITY_TOKEN

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@@ -33,7 +33,7 @@
* the {@link CatalogIndexStatus#STOPPING} state.
*/
public class DropIndexEntry extends AbstractChangeIndexStatusEntry implements Fireable {
public static final DropIndexEntrySerializer SERIALIZER = new DropIndexEntrySerializer();
public static final CatalogObjectSerializer<DropIndexEntry> SERIALIZER = new DropIndexEntrySerializer();

private final int tableId;
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like tableId is not used anywhere but tests. Let's remove it as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@@ -44,17 +44,17 @@ public class NewIndexEntry implements UpdateEntry, Fireable {

private final CatalogIndexDescriptor descriptor;

private final String schemaName;
private final int schemaId;
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need schemaId? It can be derived from table, I believe

lowka added 3 commits May 10, 2024 11:04
remove remaining schema id.
# Conflicts:
#	modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogManagerImpl.java
#	modules/catalog/src/test/java/org/apache/ignite/internal/catalog/CatalogManagerSelfTest.java
lowka added 4 commits May 10, 2024 13:02
# Conflicts:
#	modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItCreateTableDdlTest.java
@korlov42 korlov42 merged commit 09565a1 into apache:main May 10, 2024
1 check passed
@korlov42 korlov42 deleted the ignite-19082 branch May 10, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants