瀏覽代碼

20.2.1 release

David Benson 3 年之前
父節點
當前提交
bb75e49d3a

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+26-JUL-2022: 20.2.1
+
+- Adds statistics to realtime CF worker
+- Adds checksums for merge(File) error logging
+
 22-JUL-2022: 20.2.0
 
 - Changes real-time collaboration CF worker to use the same DO for multiple files

+ 1 - 1
VERSION

@@ -1 +1 @@
-20.2.0
+20.2.1

File diff suppressed because it is too large
+ 10 - 10
src/main/webapp/js/app.min.js


+ 40 - 31
src/main/webapp/js/diagramly/DrawioFile.js

@@ -338,13 +338,12 @@ DrawioFile.prototype.mergeFile = function(file, success, error, diffShadow)
 					var from = this.ui.hashValue(file.getCurrentEtag());
 					var to = this.ui.hashValue(this.getCurrentEtag());
 					
-					this.checksumError(error, patches,
-						'Shadow Details: ' + JSON.stringify(patchedDetails) +
-						'\nChecksum: ' + checksum + '\nCurrent: ' + current +
-						'\nCurrent Details: ' + JSON.stringify(currentDetails) +
-						'\nFrom: ' + from + '\nTo: ' + to +
-						'\n\nFile Data:\n' + fileData +
-						'\nPatched Shadow:\n' + data, null, 'mergeFile');
+					this.checksumError(error, patches, 'Shadow Details: ' +
+						JSON.stringify(patchedDetails) + '\nChecksum: ' +
+						checksum + '\nCurrent: ' + current + '\nCurrent Details: ' +
+						JSON.stringify(currentDetails) + '\nFrom: ' + from + '\nTo: ' +
+						to + '\n\nFile Data:\n' + fileData + '\nPatched Shadow:\n' +
+						data, null, 'mergeFile', checksum, current, file.getCurrentRevisionId());
 					
 					// Abnormal termination
 					return;
@@ -484,7 +483,7 @@ DrawioFile.prototype.compressReportData = function(data, limit, max)
 /**
  * Adds the listener for automatically saving the diagram for local changes.
  */
-DrawioFile.prototype.checksumError = function(error, patches, details, etag, functionName)
+DrawioFile.prototype.checksumError = function(error, patches, details, etag, functionName, checksum, current, rev)
 {
 	this.stats.checksumErrors++;
 	this.inConflictState = true;
@@ -575,29 +574,39 @@ DrawioFile.prototype.checksumError = function(error, patches, details, etag, fun
 				}
 			}
 
-			var type = (data != null) ? 'Report' : 'Error';
-			
-			EditorUi.logError('Checksum ' + type + ' in ' + functionName + ' ' + id,
-				null, this.getMode() + '.' + this.getId(),
-				'user_' + uid + ((this.sync != null) ?
-				'-client_' + this.sync.clientId : '-nosync') +
-				'-bytes_' + bytes + '-patches_' + patches.length +
-				((data != null) ? ('-json_' + data) : '') +
-				'-size_' + this.getSize());
-			
-			// Logs checksum error for file
-			try
-			{
-				EditorUi.logEvent({category: 'CHECKSUM-ERROR-SYNC-FILE-' + id,
-					action: functionName, label: 'user_' + uid + ((this.sync != null) ?
-					'-client_' + this.sync.clientId : '-nosync') +
-					'-bytes_' + bytes + '-patches_' + patches.length +
-					'-size_' + this.getSize()});
-			}
-			catch (e)
-			{
-				// ignore
-			}
+			this.getLatestVersion(mxUtils.bind(this, function(latestFile)
+			{				
+				// Logs checksum error for file
+				try
+				{
+					var type = (data != null) ? 'Report' : 'Error';
+					var latest = this.ui.getHashValueForPages(latestFile.getShadowPages());
+				
+					EditorUi.logError('Checksum ' + type + ' in ' + functionName + ' ' + id,
+						null, this.getMode() + '.' + this.getId(),
+						'user_' + uid + ((this.sync != null) ?
+						'-client_' + this.sync.clientId : '-nosync') +
+						'-bytes_' + bytes + '-patches_' + patches.length +
+						((data != null) ? ('-json_' + data) : '')  +
+						'-size_' + this.getSize() +
+						((checksum != null) ? ('-expected_' + checksum) : '') +
+						((current != null) ? ('-current_' + current) : '') +
+						((rev != null) ? ('-rev_' + this.ui.hashValue(rev)) : '') +
+						((latest != null) ? ('-latest_' + latest) : '') +
+						((latestFile != null) ? ('-latestRev_' + this.ui.hashValue(
+							latestFile.getCurrentRevisionId())) : ''));
+
+					EditorUi.logEvent({category: 'CHECKSUM-ERROR-SYNC-FILE-' + id,
+						action: functionName, label: 'user_' + uid + ((this.sync != null) ?
+						'-client_' + this.sync.clientId : '-nosync') +
+						'-bytes_' + bytes + '-patches_' + patches.length +
+						'-size_' + this.getSize()});
+				}
+				catch (e)
+				{
+					// ignore
+				}
+			}), error);
 		}
 	}
 	catch (e)

+ 3 - 2
src/main/webapp/js/diagramly/DrawioFileSync.js

@@ -1274,8 +1274,9 @@ DrawioFileSync.prototype.merge = function(patches, checksum, desc, success, erro
 			{
 				var to = this.ui.hashValue(target);
 				var from = this.ui.hashValue(this.file.getCurrentRevisionId());
-				this.file.checksumError(error, patches, 'From: ' + from + '\nTo: ' + to +
-					'\nChecksum: ' + checksum + '\nCurrent: ' + current, target, 'merge');
+				this.file.checksumError(error, patches, 'From: ' + from +
+					'\nTo: ' + to + '\nChecksum: ' + checksum + '\nCurrent: ' +
+					current, target, 'merge', checksum, current, target);
 
 				if (urlParams['test'] == '1')
 				{

File diff suppressed because it is too large
+ 627 - 627
src/main/webapp/js/integrate.min.js


File diff suppressed because it is too large
+ 425 - 425
src/main/webapp/js/viewer-static.min.js


File diff suppressed because it is too large
+ 425 - 425
src/main/webapp/js/viewer.min.js


File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/mxgraph/mxClient.js


File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/service-worker.js


File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/service-worker.js.map