-
Notifications
You must be signed in to change notification settings - Fork 136
IGNITE-15402 Drop partition & table folder deletion. #402
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
Conversation
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
examples/src/test/java/org/apache/ignite/example/sql/jdbc/SqlExamplesTest.java
Outdated
Show resolved
Hide resolved
examples/src/test/java/org/apache/ignite/example/table/TableExamplesTest.java
Outdated
Show resolved
Hide resolved
modules/core/src/main/java/org/apache/ignite/internal/util/CollectionUtils.java
Outdated
Show resolved
Hide resolved
modules/core/src/main/java/org/apache/ignite/internal/util/CollectionUtils.java
Outdated
Show resolved
Hide resolved
modules/core/src/main/java/org/apache/ignite/internal/util/CollectionUtils.java
Outdated
Show resolved
Hide resolved
|
|
||
| Collections.reverse(copy); | ||
|
|
||
| IgniteUtils.closeAll(concat( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I said before, I think that simply adding everything into a list and then reversing it (or using a reverse iterator) might be a better choice here. This code is more complicated than it needs to be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding atomic reference array into list won't look good either. I'll rewrite this method anyway
| stop(); | ||
|
|
||
| ColumnFamily partitionCf = partitionCfs.get(partId); | ||
| IgniteUtils.deleteIfExists(tablePath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the TableStorage should also create the tablePath since it deletes it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean "mkdir" in start method or literally determining location for the storage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mkdir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
...ge-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/RocksDbTableStorage.java
Outdated
Show resolved
Hide resolved
...ge-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/RocksDbTableStorage.java
Outdated
Show resolved
Hide resolved
...ge-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/RocksDbTableStorage.java
Show resolved
Hide resolved
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
...ge-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/RocksDbTableStorage.java
Outdated
Show resolved
Hide resolved
examples/src/test/java/org/apache/ignite/example/table/TableExamplesTest.java
Show resolved
Hide resolved
| @BeforeEach | ||
| @AfterEach | ||
| private void removeWorkDir() { | ||
| public void removeWorkDir() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we delete this method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it'll break the test, I tried. This directory is used by examples code.
...ge-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/RocksDbTableStorage.java
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| /** {@inheritDoc} */ | ||
| @Override public synchronized void start() throws StorageException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this method synchronized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was for safety when I debugged JVM crashes. I think I'll remove these modifiers
modules/storage-api/src/main/java/org/apache/ignite/internal/storage/engine/TableStorage.java
Outdated
Show resolved
Hide resolved
modules/storage-api/src/main/java/org/apache/ignite/internal/storage/engine/TableStorage.java
Outdated
Show resolved
Hide resolved
modules/storage-api/src/main/java/org/apache/ignite/internal/storage/engine/TableStorage.java
Outdated
Show resolved
Hide resolved
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
|
|
||
| /** {@inheritDoc} */ | ||
| @Override public void stop() { | ||
| NamedListView<TableView> tablesView = tablesCfg.tables().value(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add some comments about what is happening here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
| * | ||
| * @return Partition id. | ||
| */ | ||
| public int partitionId(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need this method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just makes sense and comes handy while debugging :)
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
https://issues.apache.org/jira/browse/IGNITE-15402