Skip to content

Commit ccde47c

Browse files
committed
fix: ignore temporarily the placeholder org so its not updated everytime
Signed-off-by: Uroš Marolt <uros@marolt.me>
1 parent e3fdde6 commit ccde47c

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

services/apps/data_sink_worker/src/service/member.service.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,15 @@ export default class MemberService extends LoggerBase {
188188
const orgService = new OrganizationService(this.store, this.log)
189189
if (data.organizations) {
190190
for (const org of data.organizations) {
191+
// Temp fix: skip the individual-noaccount.com placeholder org to avoid
192+
// hot-row contention on the organizations table. Permanent fix is in
193+
// tncTransformerBase.ts to stop emitting this org entirely.
194+
if (
195+
org.identities?.some((i) => i.verified && i.value === 'individual-noaccount.com')
196+
) {
197+
continue
198+
}
199+
191200
const id = await logExecutionTimeV2(
192201
() => orgService.findOrCreate(platform, integrationId, org),
193202
this.log,
@@ -398,6 +407,15 @@ export default class MemberService extends LoggerBase {
398407
const orgService = new OrganizationService(this.store, this.log)
399408
if (data.organizations) {
400409
for (const org of data.organizations) {
410+
// Temp fix: skip the individual-noaccount.com placeholder org to avoid
411+
// hot-row contention on the organizations table. Permanent fix is in
412+
// tncTransformerBase.ts to stop emitting this org entirely.
413+
if (
414+
org.identities?.some((i) => i.verified && i.value === 'individual-noaccount.com')
415+
) {
416+
continue
417+
}
418+
401419
this.log.trace({ memberId: id }, 'Finding or creating organization!')
402420

403421
const orgId = await logExecutionTimeV2(

0 commit comments

Comments
 (0)