Thanks for support.
As I posted in devexpress support center, i can see this strange behaviour:
1 - I can view the first record size, but when i scroll down the grid for some record (when in same time new record is created in db), all record disappear (it’s as if the datasource emptied)
2 - same as 1, but when no record is created, after scrolling down (about 4500 records) new requested records are all empty(datasource is not emptied, previous loaded records are still present).
3 - If grid use embedded navigator, if i request “last page” i can view first records and last records, all the records in the middle are blanks
So I have created a separate project for testing it without other features, in first place i can see that there are exception thrown every time that i create a new row while scrolling down.
You can view the test project, src and bin, at: https://drive.google.com/open?id=1KWBPeDJqpVIW5CforESrRD1kIARJT7v2
For replicate it simple:
- load a backup of postgres db from test_data_context.backup
db = test_data_context
user = test_data_context
password = test_data_context
- run server
- run 1 instance of client and click on button for insert new rows
- run 2 instance in same time and scolling down
Client give this exception
Si è verificata l’eccezione DevExpress.Data.Helpers.InconsistencyDetectedException
HResult=0x80131600
Messaggio=Key ‘39311’ fetched at index 100 does not match previously fetched key ‘39309’ for the same index; Key ‘39310’ fetched at index 101 does not match previously fetched key ‘39308’ for the same index; Key ‘39309’ fetched at index 102 does not match previously fetched key ‘39307’ for the same index; Key ‘39308’ fetched at index 103 does not match previously fetched key ‘39306’ for the same index
Origine=<Non è possibile valutare l’origine dell’eccezione>
Analisi dello stack:
in DevExpress.Data.Helpers.ServerModeCache.RaiseInconsistencyDetected(String message)
Server give this log:
DA SQL: SELECT COUNT()
FROM [generic.command] AS [t0]
ADO.NET SQL: SELECT COUNT() FROM “generic”.“command” “t0”
DA SQL: SELECT TOP (128) [t0].[datetime_created], [t0].[datetime_done], [t0].[datetime_planned], [t0].[done], [t0].[id], [t0].[id_alert], [t0].[id_cc], [t0].[id_code], [t0].[id_code_phase], [t0].[id_group_cc], [t0].[id_note], [t0].[id_order], [t0].[id_piece_phase], [t0].[id_piece_phase_abstract], [t0].[key], [t0].[month], [t0].[note], [t0].[year]
FROM [generic.command] AS [t0]
ORDER BY [t0].[id] DESC
ADO.NET SQL: SELECT “t0”.“datetime_created”, “t0”.“datetime_done”, “t0”.“datetime_planned”, “t0”.“done”, “t0”.“id”, “t0”.“id_alert”, “t0”.“id_cc”, “t0”.“id_code”, “t0”.“id_code_phase”, “t0”.“id_group_cc”, “t0”.“id_note”, “t0”.“id_order”, “t0”.“id_piece_phase”, “t0”.“id_piece_phase_abstract”, “t0”.“key”, “t0”.“month”, “t0”.“note”, “t0”.“year” FROM “generic”.“command” “t0” ORDER BY “t0”.“id” DESC LIMIT 128
‘WinFormsApplication42TestOrderBy.exe’ (CLR v4.0.30319: WinFormsApplication42TestOrderBy.exe): caricamento di ‘C:\WINDOWS\assembly\GAC_MSIL\RemObjects.SDK.ZLib\9.4.107.1363__3df3cad1b7aa5098\RemObjects.SDK.ZLib.dll’ completato. Simboli caricati.
DA SQL: SELECT COUNT()
FROM [generic.command] AS [t0]
ADO.NET SQL: SELECT COUNT() FROM “generic”.“command” “t0”
DA SQL: SELECT TOP (128) [t0].[datetime_created], [t0].[datetime_done], [t0].[datetime_planned], [t0].[done], [t0].[id], [t0].[id_alert], [t0].[id_cc], [t0].[id_code], [t0].[id_code_phase], [t0].[id_group_cc], [t0].[id_note], [t0].[id_order], [t0].[id_piece_phase], [t0].[id_piece_phase_abstract], [t0].[key], [t0].[month], [t0].[note], [t0].[year]
FROM [generic.command] AS [t0]
ORDER BY [t0].[id] DESC
ADO.NET SQL: SELECT “t0”.“datetime_created”, “t0”.“datetime_done”, “t0”.“datetime_planned”, “t0”.“done”, “t0”.“id”, “t0”.“id_alert”, “t0”.“id_cc”, “t0”.“id_code”, “t0”.“id_code_phase”, “t0”.“id_group_cc”, “t0”.“id_note”, “t0”.“id_order”, “t0”.“id_piece_phase”, “t0”.“id_piece_phase_abstract”, “t0”.“key”, “t0”.“month”, “t0”.“note”, “t0”.“year” FROM “generic”.“command” “t0” ORDER BY “t0”.“id” DESC LIMIT 128
DA SQL: SELECT TOP (201) SKIP (100) [t0].[id]
FROM [generic.command] AS [t0]
ORDER BY [t0].[id] DESC
ADO.NET SQL: SELECT “t0”.“id” FROM “generic”.“command” “t0” ORDER BY “t0”.“id” DESC LIMIT 201 OFFSET 100
Il thread 0x2bb4 è terminato con il codice 0 (0x0).
This exception will thrown with simple linq query but in production case there are join and other more complex requests, in test project i replicate both.
I can’t understand well whre the problem is, but when i see that there are problem with new rows, i created a linq with data filtering as:
from t in fDataModule.DataAdapter.GetTable<generic_command>()
where t.datetime_created < MyNow
select t
And this works without error, but in production project i haven’t always a secure column for filtering tables with large data.