xtern commented on code in PR #1501:
URL: https://github.com/apache/ignite-3/pull/1501#discussion_r1090924363
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/schema/IgniteTableImpl.java:
##########
@@ -480,10 +482,12 @@ private <RowT> ModifyRow deleteTuple(RowT row,
ExecutionContext<RowT> ectx) {
return new ModifyRow(new Row(schemaDescriptor, rowAssembler.build()),
Operation.DELETE_ROW);
}
- private ColocationGroup partitionedGroup() {
- List<List<String>> assignments = table.assignments().stream()
- .map(Collections::singletonList)
- .collect(Collectors.toList());
+ private ColocationGroup partitionedGroup(boolean collectLeaderTerms) {
+ Stream<NodeWithTerm> assignmentsStream = collectLeaderTerms
Review Comment:
I'm not sure, but it seems to me that refreshing the leader for each
partition every time we prepare a mapping might slow down the RO query
execution (see `InternalTableImpl#awaitLeaderInitialization` - currently we
refreshing them only once).
Or do you think it's not a problem?
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/schema/IgniteTableImpl.java:
##########
@@ -480,10 +482,12 @@ private <RowT> ModifyRow deleteTuple(RowT row,
ExecutionContext<RowT> ectx) {
return new ModifyRow(new Row(schemaDescriptor, rowAssembler.build()),
Operation.DELETE_ROW);
}
- private ColocationGroup partitionedGroup() {
- List<List<String>> assignments = table.assignments().stream()
- .map(Collections::singletonList)
- .collect(Collectors.toList());
+ private ColocationGroup partitionedGroup(boolean collectLeaderTerms) {
+ Stream<NodeWithTerm> assignmentsStream = collectLeaderTerms
Review Comment:
I'm not sure, but it seems to me that refreshing the leader for each
partition every time we prepare a mapping might slow down the RO query
execution (see `InternalTableImpl#awaitLeaderInitialization` - seems, that
currently we refreshing them only once).
Or do you think it's not a problem?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]