IGNITE-13492: Added snapshot test to ducktests#8575
Conversation
| """ | ||
| return str(node.account.ssh_client.exec_command("sudo iptables -L -n")[1].read(), sys.getdefaultencoding()) | ||
|
|
||
| def restart(self): |
There was a problem hiding this comment.
made a private rotate_log
| node.account.ssh(f'if [ -e {self.STDOUT_STDERR_CAPTURE} ];' | ||
| f'then ' | ||
| f'cd {self.LOGS_DIR};' | ||
| f'N=`ls | grep log | wc -l`;' |
There was a problem hiding this comment.
Use grep with full pattern patching, smth like "^console_?[0-9]*.log$". As string "log" may match different log files.
Alternative is using service counter variable that incremented within restart method.
There was a problem hiding this comment.
when starting different services on the same nodes (for example, when testing the PDS), we will not be able to use counter the service.
So I think the counter is a bad idea.
…92v1 # Conflicts: # modules/ducktests/tests/ignitetest/services/utils/ignite_aware.py # modules/ducktests/tests/ignitetest/services/utils/ignite_persistence.py
…92v1 # Conflicts: # modules/ducktests/tests/ignitetest/services/utils/control_utility.py # modules/ducktests/tests/ignitetest/services/utils/ignite_persistence.py
| @Override public void run(JsonNode jNode) { | ||
| String cacheName = jNode.get("cacheName").asText(); | ||
|
|
||
| long size = jNode.get("size").asLong(); |
There was a problem hiding this comment.
what is "size" when we have "dataSize"?
There was a problem hiding this comment.
On, now we have "amount". Amount of what?
|
|
||
| int dataSize = jNode.get("dataSize").asInt(); | ||
|
|
||
| markInitialized(); |
There was a problem hiding this comment.
what is the reason to have a dedicated "initialized" state?
There was a problem hiding this comment.
File "/opt/ignite-dev/modules/ducktests/tests/ignitetest/tests/snapshot_test.py", line 87, in snapshot_test
loader.run()
File "/usr/local/lib/python3.7/dist-packages/ducktape/services/service.py", line 322, in run
self.start()
File "/opt/ignite-dev/modules/ducktests/tests/ignitetest/services/utils/ignite_aware.py", line 85, in start
self.await_started()
File "/opt/ignite-dev/modules/ducktests/tests/ignitetest/services/ignite_app.py", line 51, in await_started
self.__check_status("IGNITE_APPLICATION_INITIALIZED", timeout=self.startup_timeout_sec)
need "initialized" state
There was a problem hiding this comment.
Let me ask again,
what is the reason to have dedicated "initialized" and "finished" states?
Why not only the markSyncExecutionComplete() used?
There was a problem hiding this comment.
if something goes wrong, during operation, then we will consider it during initialization, I think this is not correct
|
|
||
| def idle_verify_dump(self, node=None): | ||
| """ | ||
| Idle verify dump. |
There was a problem hiding this comment.
"Node" param description missed
There was a problem hiding this comment.
"Node where will be dump file"
Could you please specify an action in this sentence?
| indexed_types=['java.util.UUID', 'byte[]'])] | ||
| ) | ||
|
|
||
| num_nodes = len(self.test_context.cluster) |
There was a problem hiding this comment.
any reason to have this variable?
There was a problem hiding this comment.
we can run this test by passing a parameter through globals
There was a problem hiding this comment.
any reason to have a dedicated variable?
|
|
||
| num_nodes = len(self.test_context.cluster) | ||
|
|
||
| service = IgniteService(self.test_context, ignite_config, num_nodes=num_nodes - 1, startup_timeout_sec=180) |
There was a problem hiding this comment.
why it may take so long time to startup?
There was a problem hiding this comment.
for local tests like in PmeFreeSwitchTest
There was a problem hiding this comment.
Could you please answer the question I asked?
There was a problem hiding this comment.
Startup takes the same amount of time as in other tests with PDS.
Time increased for local startup.
| /** | ||
| * Loading random uuids to cache. | ||
| */ | ||
| public class UuidDataLoaderApplication extends IgniteAwareApplication { |
There was a problem hiding this comment.
Why it streams UUID as a key?
There was a problem hiding this comment.
we may run it repeatedly, key should be different
There was a problem hiding this comment.
Don't see tests where it runs repeatedly.
There was a problem hiding this comment.
SnapshotTest
we run it repeatedly
| node.account.kill_java_processes(self.APP_SERVICE_CLASS, clean_shutdown=False, allow_fail=True) | ||
| node.account.ssh("rm -rf -- %s" % self.persistent_root, allow_fail=False) | ||
|
|
||
| def rename_database(self, new_name: str): |
There was a problem hiding this comment.
it performs "mv" but has the "rename*" name...
There was a problem hiding this comment.
"move" implies getting a new path. we rename the base folder
There was a problem hiding this comment.
Seems you changed mv to cp, what the reason to perform a so heavy operation?
…92v1 # Conflicts: # modules/ducktests/tests/ignitetest/services/ignite.py
…92v1 # Conflicts: # modules/ducktests/tests/ignitetest/services/utils/control_utility.py # modules/ducktests/tests/ignitetest/services/utils/ignite_configuration/__init__.py # modules/ducktests/tests/ignitetest/services/utils/path.py
f8a0977 to
a6b15a5
Compare
| params={ | ||
| "cacheName": self.CACHE_NAME, | ||
| "interval": 500_000, | ||
| "dataSizeKB": 1 |
There was a problem hiding this comment.
valueSizeKb is better imho

Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
The Contribution Checklist
The description explains WHAT and WHY was made instead of HOW.
The following pattern must be used:
IGNITE-XXXX Change summarywhereXXXX- number of JIRA issue.(see the Maintainers list)
the
green visaattached to the JIRA ticket (see TC.Bot: Check PR)Notes
If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com #ignite channel.