[ 
https://issues.apache.org/jira/browse/IGNITE-27335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18044696#comment-18044696
 ] 

Pavel Tupitsyn commented on IGNITE-27335:
-----------------------------------------

https://github.com/apache/ignite-3/commit/be8cf18d44055c72304a59f78873571c2848667b

> Client data streamer does not propagate observable timestamp
> ------------------------------------------------------------
>
>                 Key: IGNITE-27335
>                 URL: https://issues.apache.org/jira/browse/IGNITE-27335
>             Project: Ignite
>          Issue Type: Bug
>          Components: data streamer ai3, thin clients ai3
>            Reporter: Pavel Tupitsyn
>            Assignee: Pavel Tupitsyn
>            Priority: Critical
>              Labels: ignite-3
>             Fix For: 3.2
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> STREAMER_BATCH_SEND client op returns zero observable timestamp. As a result, 
> the changes made by the streamer are not observed by the client right away.
> Add the following to *ItAbstractDataStreamerTest*
> {code:java}
>     @Test
>     public void testManyItemsSql() {
>         ignite().sql().executeScript("delete from " + TABLE_NAME);
>         int count = 10_000;
>         RecordView<Tuple> view = defaultTable().recordView();
>         CompletableFuture<Void> streamerFut;
>         try (var publisher = new 
> SubmissionPublisher<DataStreamerItem<Tuple>>()) {
>             var options = DataStreamerOptions.builder().pageSize(42).build();
>             streamerFut = view.streamData(publisher, options);
>             for (int i = 0; i < count; i++) {
>                 publisher.submit(DataStreamerItem.of(tuple(i, "foo-" + i)));
>             }
>         }
>         streamerFut.orTimeout(30, TimeUnit.SECONDS).join();
>         ArrayList<String> sqlRes = new ArrayList<>(count);
>         ResultSet<SqlRow> resultSet = ignite().sql().execute(null, "SELECT 
> name FROM " + TABLE_NAME + " order by id");
>         resultSet.forEachRemaining(row -> sqlRes.add(row.stringValue(0)));
>         assertEquals(count, sqlRes.size());
>         for (int i = 0; i < sqlRes.size(); i++) {
>             assertEquals("foo-" + i, sqlRes.get(i));
>         }
>     }
> {code}
> The SQL query sees incomplete results:
> {code}
> Expected :10000
> Actual   :5628
> {code}
> (the actual number is random)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to