-
Notifications
You must be signed in to change notification settings - Fork 81
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
Add Location removal support and update SourcePartitionedTable #4373
Conversation
…er so UpdateSourceConbiner could have more control
engine/table/src/main/java/io/deephaven/engine/table/impl/SourceTable.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/SourceTable.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/locations/TableLocationProvider.java
Outdated
Show resolved
Hide resolved
...c/main/java/io/deephaven/engine/table/impl/locations/impl/AbstractTableLocationProvider.java
Outdated
Show resolved
Hide resolved
...c/main/java/io/deephaven/engine/table/impl/locations/impl/AbstractTableLocationProvider.java
Outdated
Show resolved
Hide resolved
...le/src/main/java/io/deephaven/engine/table/impl/locations/impl/FilteredTableDataService.java
Outdated
Show resolved
Hide resolved
|
||
@Override | ||
public boolean recordedVariablesAreValid() { | ||
return error == null && super.recordedVariablesAreValid(); |
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.
Don't you need to fix this check in MergedListener to use the recordedVariablesAreValid instead?
for (ListenerRecorder recorder : recorders) {
if (recorder.getNotificationStep() == currentStep) {
added += recorder.getAdded().size();
removed += recorder.getRemoved().size();
modified += recorder.getModified().size();
shifted += recorder.getShifted().getEffectiveSize();
}
}
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, the recorder will return empty everytthing when recorded values are not valid. That's why I did it that way
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.
A table cannot double-notify. Those fields have to be empty. I don't think override to recordedVariablesAreValid
is necessary or advisable.
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.
The source table may not double notify. In the case that the source table of the ListenerRecorder notifies us of an error, we should correctly set the notification step and record the error - the listener did have a notification on that step. Given that there is an error there will never again be a valid notification from that source table.
The update in this case is going to be null; and if we ask the question "did this get updated on the current step" and then fetch and dereference the null update as is done on line 319-326 of MergedListener we have an error. The change to the recordedVariablesAreValid (which is just asking about the step) means that we get the appropriate empty update in this section of the MergedListener.
engine/table/src/main/java/io/deephaven/engine/table/impl/sources/UnionSourceManager.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/SourcePartitionedTable.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/sources/UnionSourceManager.java
Outdated
Show resolved
Hide resolved
I am satisfied with this code. @rcaudy can you please assign a Community team member to review 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.
I think this is fundamentally flawed. You will not be able to properly handle previous data from the removed table location when processing a remove, which makes this entire effort kind of moot.
I think there's utility in adding proper removal propagation, if it's corrected to not be part of the interface.
...c/main/java/io/deephaven/engine/table/impl/locations/impl/AbstractTableLocationProvider.java
Outdated
Show resolved
Hide resolved
...c/main/java/io/deephaven/engine/table/impl/locations/impl/AbstractTableLocationProvider.java
Outdated
Show resolved
Hide resolved
...c/main/java/io/deephaven/engine/table/impl/locations/impl/AbstractTableLocationProvider.java
Outdated
Show resolved
Hide resolved
...c/main/java/io/deephaven/engine/table/impl/locations/impl/AbstractTableLocationProvider.java
Outdated
Show resolved
Hide resolved
...c/main/java/io/deephaven/engine/table/impl/locations/impl/AbstractTableLocationProvider.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/sources/UnionSourceManager.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/sources/UnionSourceManager.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/sources/UnionSourceManager.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/sources/UnionSourceManager.java
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/sources/UnionSourceManager.java
Outdated
Show resolved
Hide resolved
Since the implementations of removal are out of scope for this PR (and for core at this time), I think we can rehabilitate the PR if we ensure that the |
engine/table/src/main/java/io/deephaven/engine/table/impl/sources/UnionSourceManager.java
Outdated
Show resolved
Hide resolved
engine/table/src/test/java/io/deephaven/engine/table/impl/SourcePartitionedTableTest.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/SourceTable.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/SourceTable.java
Outdated
Show resolved
Hide resolved
...c/main/java/io/deephaven/engine/table/impl/locations/impl/AbstractTableLocationProvider.java
Outdated
Show resolved
Hide resolved
...c/main/java/io/deephaven/engine/table/impl/locations/impl/AbstractTableLocationProvider.java
Outdated
Show resolved
Hide resolved
...le/src/main/java/io/deephaven/engine/table/impl/locations/TableLocationRemovedException.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/locations/TableLocationProvider.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/SourcePartitionedTable.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/SourcePartitionedTable.java
Outdated
Show resolved
Hide resolved
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.
- In the buffer:
** If you see a remove: if there’s a pending add, delete it, and ignore the remove - In consumers of the buffer:
** Always process removes before adds
engine/table/src/main/java/io/deephaven/engine/table/impl/SourcePartitionedTable.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/SourcePartitionedTable.java
Show resolved
Hide resolved
columnChunkPageStore.fillChunkAppend(context, destination, rowSequenceIterator); | ||
} | ||
|
||
@Override | ||
public final ChunkPage<ATTR> getChunkPageContaining(final long elementIndex) { | ||
throwIfPoisioned(); |
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.
These are more aggressive than we need to be. We can absolutely read from cached pages. We cannot read new pages.
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.
engine/table/src/main/java/io/deephaven/engine/table/impl/sources/regioned/ColumnRegion.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/SourceTable.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/sources/regioned/ColumnRegion.java
Outdated
Show resolved
Hide resolved
...le/src/main/java/io/deephaven/engine/table/impl/locations/TableLocationRemovedException.java
Outdated
Show resolved
Hide resolved
...c/main/java/io/deephaven/engine/table/impl/sources/regioned/RegionedColumnSourceManager.java
Outdated
Show resolved
Hide resolved
...e/src/main/java/io/deephaven/engine/table/impl/sources/regioned/GenericColumnRegionBase.java
Outdated
Show resolved
Hide resolved
…ces/regioned/GenericColumnRegionBase.java Co-authored-by: Ryan Caudy <rcaudy@gmail.com>
This fixes #4372 and #3077.