Skip to content

IGNITE-17275 Sql. Performance testing of pure SQL execution#1483

Merged
korlov42 merged 5 commits into
apache:mainfrom
gridgain:ignite-17275
Jan 11, 2023
Merged

IGNITE-17275 Sql. Performance testing of pure SQL execution#1483
korlov42 merged 5 commits into
apache:mainfrom
gridgain:ignite-17275

Conversation

@korlov42

@korlov42 korlov42 commented Dec 27, 2022

Copy link
Copy Markdown
Contributor

The patch introduces the Test Object Builder framework and repas an example of use as very simple test to measure the performance of the query execution engine in isolation from the overhead introduced by tables and transactions

@zstan zstan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i leave some comments, plz check them

* @param <T> A type of the produced elements.
* @return A data provider instance backed by given collection.
*/
static <T> DataProvider<T> fromCollection(Collection<T> collection) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

seems not used

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think this will be used frequently as the framework is being adopted. But if you insist, I'll remove this

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

no, it`s all ok in such a case


/** {@inheritDoc} */
@Override
public ChildT addDataProvider(String targetNode, DataProvider<?> dataProvider) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

so, we can have different provider per node? is it useful ? probably we need additional method without targetNode used for all nodes by default ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

so, we can have different provider per node? is it useful ?

I believe it is very useful. As a framework, it should be flexible enough to give an ability to configure the test cluster in the way it will be configured in real life (assume affinity distribution or data skews)

probably we need additional method without targetNode used for all nodes by default ?

I added ClusterTableBuilder#defaultDataProvider to cover this. Please take a look

import org.jetbrains.annotations.Nullable;

/**
* Dummy cluster service object which helps to created connect

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Dummy cluster service object which helps to created connect
* Dummy cluster service object which helps to create connected

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additionally i suppose that too frequent "dummy" word usage is excessive, whole ignite code is hard to understand )

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Paraphrase this a little

* in execution-related scenarios.
*/
public class TestTable implements InternalIgniteTable {
private static final AssertionError DATA_PROVIDER_NOT_CONFIGURED_EXCEPTION =

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All that end user can see is just this error creation i dont think its right ?

java.lang.AssertionError: DataProvider not configured at org.apache.ignite.internal.sql.engine.framework.TestTable.<clinit>(TestTable.java:65) at org.apache.ignite.internal.sql.engine.framework.TestBuilders$ClusterTableBuilderImpl.end(TestBuilders.java:167)

@AMashenkov AMashenkov Jan 10, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Agree with @zstan,
Let's create DummyProvider that will throw an exception and maybe rewrite

DataProvider<RowT> dataProvider(String nodeName) {
         return (DataProvider<RowT>) dataProviders.getOrDefault(nodeName, dummyProvider);
     } 

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I improved the message by providing the name of the table and name of the node data provider is. requested for

@zstan zstan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

cool. lets proceed, dont forget about mentioned additional issue.

- change `nodes` method signature to force user to provide at least one node name
- add validation that all data providers belongs to a node of the cluster
- improve assertion message in case of someone tries to get not configured dataProvider
- typos
- add defaultDataProvider configuration to the ClusterTableBuilder
@korlov42
korlov42 merged commit cb7cade into apache:main Jan 11, 2023
@korlov42
korlov42 deleted the ignite-17275 branch January 11, 2023 06:58
maxzhuravkov pushed a commit to gridgain/apache-ignite-3 that referenced this pull request Mar 18, 2023
maxzhuravkov pushed a commit to gridgain/apache-ignite-3 that referenced this pull request Apr 19, 2023
isapego pushed a commit to isapego/ignite-3 that referenced this pull request Dec 26, 2024
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.

3 participants