Another question independent from the above - we o...
# troubleshoot
q
Another question independent from the above - we observe exponential raise in time of processing aspect when running reindexing job - with 1.6 mln aspects we observe that initial batches are processed very quickly:
Copy code
metrics so far RestoreIndicesResult(ignored=0, rowsMigrated=1000, timeSqlQueryMs=2, timeGetRowMs=0, timeUrnMs=6, timeEntityRegistryCheckMs=0, aspectCheckMs=0, createRecordMs=92, sendMessageMs=854)
Successfully sent MAEs for 1000/1651106 rows (0.06% of total). 0 rows ignored (0.00% of total)
0.02 mins taken. 33.25 est. mins to completion. Total mins est. = 33.27.
While time increases with each batch to reach 20 mins per batch at the end:
Copy code
Reading rows 1650000 through 1651000 from the aspects table completed.
Successfully sent MAEs for 1649942/1651106 rows (99.93% of total). 58 rows ignored (0.00% of total)
2113.96 mins taken. 1.49 est. mins to completion. Total mins est. = 2115.45.
metrics so far RestoreIndicesResult(ignored=58, rowsMigrated=1650942, timeSqlQueryMs=40, timeGetRowMs=0, timeUrnMs=1821, timeEntityRegistryCheckMs=376, aspectCheckMs=296, createRecordMs=31830, sendMessageMs=80009)
Args are RestoreIndicesArgs(start=1651000, batchSize=1000, numThreads=1, batchDelayMs=100, aspectName=null, urn=null, urnLike=null)
Successfully sent MAEs for 1650942/1651106 rows (99.99% of total). 58 rows ignored (0.00% of total)
Reading rows 1651000 through 1652000 from the aspects table started.
2117.09 mins taken. 0.21 est. mins to completion. Total mins est. = 2117.30.
Did somebody experience similar problems with restore job? Can we improve performance somehow?
i
Hello Piotr, This behaviour is not uncommon due to the nature of how the reindexing job works. You can try and tweak the job’s configuration around batch sizes and number of threads to increase the performance of the job.
These are the configs:
Copy code
RestoreIndicesArgs(start=1651000, batchSize=1000, numThreads=1, batchDelayMs=100, aspectName=null, urn=null, urnLike=null)
w
the nature of how the reindexing job works
Can you elaborate a little bit on this? what are the key and critical elements involved in the re-indexation? so we can monitor while doing our operations. Thanks
i
Reindexing in DataHub amounts to scanning the metadata graph in SQL for the latest aspects (with column version = 0) and for each one emitting an MCL event into the Kafka topic which when processed will upsert the graph and search databases just like a new piece of metadata would. Effectively it is re-processing the entire metadata graph found in SQL into the graph and search databases. The job itself that does the SQL scan and MCL message generation is multi-threaded and scalable through configuration. The most critical is really the mcl message processing and elasticsearch processing.
So keep an eye out for Kafka topic lag, elasticsearch cluster health & performance and scale the reindexing job as needed to get the mcl messages out.
You may want to ensure the mcl kafka topic has more than 1 partition, enable standalone consumers and scale the mcl processor (only makes sense with more than 1 kafka topic partition)
q
MCL processing is done by MAE consumer right? We did not see any significant increase in MAE consumer CPU usage even though there is a huge lag in the topic
By the way are there differences between MCP and MCE processing from performance point of view?
i
Correct, mcl processing is done by the MAE consumer if you have enabled standalone consumers.
While CPU may not be the bottleneck it may be bottlenecked at the elasticsearch client in the consumer. Whether because the operation is synchronous, in blocked I/o or because the elastic cluster is unable to handle more.
Mcp is the a newer version of Mce, we have deprecated Mce last year. The names of the consumers rename as legacy only.
q
still connectors send mces though?
with snapshots
our Open Search instance also doesn't seem to be at limits
i
Which connectors?
i
Ah, yes there maybe some old connectors that have not yet been updated
i
Yes that is the MCL consumer code. You can configure them through
SPRING_KAFKA
environment variables.
w
Thanks Pedro