Skip to content

Conversation

@nuno-vieira
Copy link
Member

@nuno-vieira nuno-vieira commented Sep 13, 2023

🔗 Issue Links

Related to https://github.com/GetStream/ios-issues-tracking/issues/270
Resolves https://github.com/GetStream/ios-issues-tracking/issues/555

🎯 Goal

Fix crashes related to the Logger not being Thread-safe.

🧪 Manual Testing Notes

N/A

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change follows zero ⚠️ policy (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (docusaurus, tutorial, CMS)

@nuno-vieira nuno-vieira added 🐞 Bug An issue or PR related to a bug 🌐 SDK: StreamChat (LLC) Tasks related to the StreamChat LLC SDK labels Sep 13, 2023
@nuno-vieira nuno-vieira requested a review from a team as a code owner September 13, 2023 18:26
Copy link
Contributor

@martinmitrevski martinmitrevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just few comments about the thread safety mechanism

Copy link
Contributor

@martinmitrevski martinmitrevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the queues is still serial

func test_log_isThreadSafe() {
LogConfig.destinationTypes = [ConsoleLogDestination.self]

DispatchQueue.concurrentPerform(iterations: 100) { _ in
Copy link
Contributor

@ipavlidakis ipavlidakis Sep 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without your changes, are those tests failing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes 👍

Copy link
Contributor

@martinmitrevski martinmitrevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm ✅

@nuno-vieira nuno-vieira enabled auto-merge (squash) September 15, 2023 09:57
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 13 Code Smells

88.2% 88.2% Coverage
0.0% 0.0% Duplication

@nuno-vieira nuno-vieira merged commit 8ca7c87 into develop Sep 15, 2023
@nuno-vieira nuno-vieira deleted the fix/logger-not-thread-safe branch September 15, 2023 12:52
@ipavlidakis ipavlidakis mentioned this pull request Sep 18, 2023
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 Bug An issue or PR related to a bug 🌐 SDK: StreamChat (LLC) Tasks related to the StreamChat LLC SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants