Hi,

This patch fixes the problem (at least for me, on the one server where it manifested itself). It might not be the best solution though. I've sent it to Kopano to ask for feedback.

Cheers, Roel
Decrease ICS processing batch size

This fixes the following Z-push error:

   StatusException: ExportChangesICS->InitializeExporter():
       Error, mapi_exportchanges_config() failed: 0xFFFFFFFF8004010F
       - code: 12
       - file: /usr/share/z-push/backend/kopano/exporter.php:230

when running kopanocore with Mariadb 10.3.

Index: kopanocore-8.7.0/provider/libserver/ECICS.cpp
===================================================================
--- kopanocore-8.7.0.orig/provider/libserver/ECICS.cpp
+++ kopanocore-8.7.0/provider/libserver/ECICS.cpp
@@ -490,7 +490,7 @@ static ECRESULT getchanges_contents(stru
 	std::vector<DB_ROW> db_rows;
 	std::vector<DB_LENGTHS> db_lengths;
 	static constexpr unsigned int ncols = 7;
-	unsigned long col_lengths[1000*ncols];
+	unsigned long col_lengths[500*ncols];
 	unsigned int length_counter = 0;
 
 	while (lpDBResult && (lpDBRow = lpDBResult.fetch_row()) != nullptr) {
@@ -506,7 +506,7 @@ static ECRESULT getchanges_contents(stru
 		}
 		db_rows.emplace_back(lpDBRow);
 		db_lengths.emplace_back(lpDBLen);
-		if (db_rows.size() == 1000) {
+		if (db_rows.size() == 500) {
 			er = lpHelper->ProcessRows(db_rows, db_lengths);
 			if (er != erSuccess)
 				return er;

Reply via email to