Copilot commented on code in PR #6608:
URL: https://github.com/apache/ignite-3/pull/6608#discussion_r2355774097
##########
modules/platforms/dotnet/Apache.Ignite/Internal/Table/Table.cs:
##########
@@ -267,19 +267,22 @@ internal async ValueTask<PreferredNode>
GetPreferredNode(int colocationHash, ITr
private Task<Schema> GetCachedSchemaAsync(int version)
{
- var task = GetOrAdd();
-
- if (!task.IsFaulted)
+ if (_schemas.TryGetValue(version, out var task))
{
- return task;
- }
+ if (!task.IsFaulted)
+ {
+ return task;
+ }
- // Do not return failed task. Remove it from the cache and try
again.
- _schemas.TryRemove(new KeyValuePair<int, Task<Schema>>(version,
task));
+ // Do not return old failed task. Remove it from the cache and
try again.
Review Comment:
[nitpick] The comment should read 'Do not return failed task' to match the
original wording, as 'old' is unnecessary and changes the meaning.
```suggestion
// Do not return failed task. Remove it from the cache and
try again.
```
--
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]