From c6071397e3b5db9fbb466a6dd4ba38b2bb703cbf Mon Sep 17 00:00:00 2001 From: Matteo Cominetti Date: Wed, 21 Dec 2022 18:11:57 +0100 Subject: [PATCH] =?UTF-8?q?fix(acad):=20removes=20collaborators=20form=20t?= =?UTF-8?q?he=20stream=20state=20cache=20to=20limit=E2=80=A6=20(#2033)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(acad): removes collaborators form the stream state cache to limit saved stream size #2030 * docs: adds inline comment Co-authored-by: Claire Kuang --- .../ConnectorAutocadCivil/Storage/SpeckleStreamManager.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ConnectorAutocadCivil/ConnectorAutocadCivil/Storage/SpeckleStreamManager.cs b/ConnectorAutocadCivil/ConnectorAutocadCivil/Storage/SpeckleStreamManager.cs index 9a830a896b..bff030f213 100644 --- a/ConnectorAutocadCivil/ConnectorAutocadCivil/Storage/SpeckleStreamManager.cs +++ b/ConnectorAutocadCivil/ConnectorAutocadCivil/Storage/SpeckleStreamManager.cs @@ -73,6 +73,12 @@ public static void WriteStreamStateList(Document doc, List streamSt if (doc == null) return; + //fix for metadata length limitation issues https://github.com/specklesystems/speckle-sharp/issues/2030 + foreach (var streamState in streamStates) + { + streamState.CachedStream.collaborators = new List(); + } + using (DocumentLock l = doc.LockDocument()) { using (Transaction tr = doc.Database.TransactionManager.StartTransaction())