Internal Salesforce.com error when updating date field? - salesforce

I'm getting
Internal Salesforce.com error
I've tracked it to when I'm calling update on a contact that updates the birthday field. Any idea why that may be happening?
Here is the top function that is called from the trigger
//Called from after update trigger
public static void onAfterUpdate(Map<Id,Contact> newContactMap, Map<Id, Contact> oldContactMap)
{
...
cp.UpdateBirthdateOfContact();
cp.updateContacts();
...
}
Here is the ContactProcesses class that has those functions
public class ContactProcesses {
...
public void UpdateBirthdateOfContact() {
for(Contact c : givenContactList) {
if(c.Birthday_Day__c != null && c.Birthday_Day__c != 'Unknown' && c.Birthday_Month__c != null && c.Birthday_Month__c != 'Unknown' && c.Birthday_Year__c != null && c.Birthday_Year__c != 'Unknown') {
Contact toUpdate = getContact(c.id);
System.debug('Starting parse...');
toUpdate.Birthdate = Date.parse(monthDict.get(c.Birthday_Month__c) + '/' + c.Birthday_Day__c + '/' + c.Birthday_Year__c);
System.debug('This is the birthdate: ' + String.valueOf(toUpdate.Birthdate));
}
}
}
...
public integer updateContacts() {
Integer toReturn = 0;
System.debug('Size is ' + updateContactList.size());
if(updateContactList.size() > 0) System.debug('Contact is ' + updateContactList[0]);
if(updateContactList.size() > 0) {
update updateContactList; //Error here
toReturn = updateContactList.size();
updateContactList.clear();
}
...
}
...
}
The error is being thrown when calling update on the contacts.
Here's some of the log leading up to the error
10:47:32.499 (3473484535)|METHOD_ENTRY|[312]|01p3F0000083em6|ContactProcesses.UpdateBirthdateOfContact()
10:47:32.499 (3473491521)|VARIABLE_SCOPE_BEGIN|[335]|this|ContactProcesses|true|false
10:47:32.499 (3473529495)|VARIABLE_ASSIGNMENT|[335]|this|{"givenContactList":"0x618bdcc8","oldContactMap":"0x2ca04f11","toCreateTaskLst":"0x3a02db51","updateAccountList":"0x3e2f50bd","updateContactList":"0x12e0c19c","updateMemDetails":"0x2d323294"}|0x530ffd91
10:47:32.499 (3473539265)|STATEMENT_EXECUTE|[335]
10:47:32.499 (3473560011)|HEAP_ALLOCATE|[336]|Bytes:5
10:47:32.499 (3473576490)|VARIABLE_SCOPE_BEGIN|[336]|c|Contact|true|false
10:47:32.499 (3475137229)|VARIABLE_ASSIGNMENT|[336]|c|{"LastModifiedDate":"2020-08-04T17:47:33.000Z","HasOptedOutOfFax":false,"Email_Correspondence_Only__c":false,"pi__Needs_Score_Synced__c":false,"AC_HIdden_InProgress_Activities_For_Week__c":0,"Do_Not_Call_At_Work__c":false,"Is_US_Contact__c":false,"Is_Anonymous__c":false,"IsDeleted":false,"Telemarketing_Opt_Out__c":false,"HiddenFlag__c":false,"Ambassador_Mail_Opt_Out__c":false,"Gender__c":"Male","MailingCity":"Hollbrook","Wedding_Anniversary_Day__c":"Unknown","Mail_Opt_Out__c":false,"Birthday_Day__c":"3","Org_Closed__c":false,"Id":"0033F00000PlHl6QAF","Greeting__c":"Friend","Created_Date_ADF__c":"2020-06-19T00:00:00.000Z","Is_Masterworks_Scoring__c":false,"Wedding_Anniversary_Year__c":"Unknown","Exclude_from_New_Ministry_Friend_Contact__c":false,"Spouse_Birthday_Year__c":"Unknown","DoNotCall":false,"Faith_Justice_Opt_Out__c":false,"Wedding_Anniversary_Month__c":"Unknown","MailingCountry":"USA","MailingState":"OR","Spouse_Birthday_Month__c":"Unknown","Do_Not_Mail__c":false,"OwnerId":"005f4000003ptcBAAQ","Addressee__c":"Test Street Caps","RecordTypeId":"012f4000000d6nlAAA","Is_Not_Presumed_Deceased__c":false,"AC_HiddenTriggerDate__c":"2020-06-24T20:35:37.000Z","Number_of_Newsletters_NL__c":"Eligible to Receive (8 more) ...","AC_Hidden_No_of_Open_Activities__c":0,"Likeminded_M_F__c":"Unknown","ADF_Foundation_Mail_Opt_Out__c":false,"Likeminded_Life__c":"Unknown","AC_HiddenForAmbassadorContact__c":false,"Is_Bad_Address__c":false,"AC_isCreatedAmbassador__c":false,"AC_Hidden_No_of_Closed_Events__c":0,"SystemModstamp":"2020-08-04T17:47:33.000Z","Import_From_RV1__c":false,"Appeals_Opt_Out__c":false,"Spouse_Birthday_Day__c":"Unknown","Age__c":14,"AccountId":"0013F00000YSUlmQAH","AC_UserName__c":"jdias#adflegal.org.j (7 more) ...","Spouse_Contact_Updated__c":false,"Birthday_Month__c":"April","CA_HiddenIsUserActive__c":false,"Address_Standardization_Status__c":"Standardization Pend (3 more) ...","AC_Duplicate_Contact_From_Ambassador__c":false,"Is_International_Contact__c":false,"Birthday_Year__c":"2006","Suffix__c":"Jr.","Is_Head_of_Household__c":false,"Faith_Justice__c":false,"CreatedById":"005f4000003ptcBAAQ","AC_Send_Ambasador_Captain_Email__c":false,"ADF_Duplicate_Check__c":false,"AC_Spouse_Interested_To_Be_Ambassador__c":false,"AC_Hidden_No_of_Open_Events__c":0,"IsEmailBounced":false,"Is_Email_Bounced__c":false,"HasOptedOutOfEmail":false,"Is_Spouse_Primary__c":false,"AMFEMs_Opt_Out__c":false,"Birthdate":"2006-04-03T00:00:00.000Z","Do_Not_Auto_Update__c":false,"AC_Total_Amount_Paid_By_Contact__c":0.00,"Former_Account__c":false,"Is_Presumed_Deceased__c":false,"CreatedDate":"2020-06-19T20:35:37.000Z","Received_New_Donor_Package__c":false,"LastName":"Test Street Caps","MailingStreet":"Crater\r\nGreat\r\nLakes","Is_Deceased__c":false,"AC_HIdden_Closed_Activities_For_Week__c":0,"Mailing_Address_Type__c":"Work","AC_Send_Ambassador_Reg_Email__c":false,"Receipts_Only_No_Other_Mail__c":false,"Contact_Record_ID__c":"CON-1309782","AC_HiddenYearTemplate__c":"2020","Is_Spouse_Deceased__c":false,"Account_Matches_Employee_Giving__c":false,"AC_Total_Amount_Paid_By_Ambassador_Conta__c":0.00,"Application_Shield_Contact__c":false,"Receipts_Opt_Out__c":false,"Is_Legal_Contact__c":false,"Contact_18_Character_ID__c":"0033F00000PlHl6QAF","Newsletter_NL_Opt_Out__c":false,"International_Dialing_Code__c":"1","Duplicate_Match_Check_Status__c":"Needs Check","Do_Not_Email__c":false,"AC_IsEmailSent__c":false,"AC_Hidden_No_of_InProgress_Tasks__c":0,"Email_Appeals__c":false,"Acknowledgement_Sent__c":false,"pi__pardot_hard_bounced__c":false,"AC_Hidden_No_of_Closed_Activities__c":0,"Pillars_of_Freedom_Mail_Opt_Out__c":false,"LastModifiedById":"005f4000003ptcBAAQ","Is_VIP__c":false,"Likeminded_Religious_Liberty__c":"Unknown"}|0x2b45fd99
10:47:32.499 (3475198729)|STATEMENT_EXECUTE|[336]
10:47:32.499 (3475248195)|STATEMENT_EXECUTE|[337]
10:47:32.499 (3475250525)|STATEMENT_EXECUTE|[338]
10:47:32.499 (3475263262)|METHOD_ENTRY|[338]|01p3F0000083em6|ContactProcesses.getContact(Id)
10:47:32.499 (3475273302)|VARIABLE_SCOPE_BEGIN|[445]|this|ContactProcesses|true|false
10:47:32.499 (3475312987)|VARIABLE_ASSIGNMENT|[445]|this|{"givenContactList":"0x618bdcc8","oldContactMap":"0x2ca04f11","toCreateTaskLst":"0x3a02db51","updateAccountList":"0x3e2f50bd","updateContactList":"0x12e0c19c","updateMemDetails":"0x2d323294"}|0x530ffd91
10:47:32.499 (3475321537)|VARIABLE_SCOPE_BEGIN|[445]|conId|Id|false|false
10:47:32.499 (3475567614)|VARIABLE_ASSIGNMENT|[445]|conId|"0033F00000PlHl6QAF"
10:47:32.499 (3475581235)|STATEMENT_EXECUTE|[445]
10:47:32.499 (3475617212)|HEAP_ALLOCATE|[447]|Bytes:5
10:47:32.499 (3475640482)|VARIABLE_ASSIGNMENT|[447]|c|null|
10:47:32.499 (3475650569)|STATEMENT_EXECUTE|[447]
10:47:32.499 (3475653796)|STATEMENT_EXECUTE|[452]
10:47:32.499 (3475688973)|HEAP_ALLOCATE|[452]|Bytes:4
10:47:32.499 (3475770784)|VARIABLE_ASSIGNMENT|[452]|this.Id|"0033F00000PlHl6QAF"|0x340769d5
10:47:32.499 (3475797188)|VARIABLE_SCOPE_BEGIN|[452]|c|Contact|true|false
10:47:32.499 (3475822063)|VARIABLE_ASSIGNMENT|[452]|c|{"Id":"0033F00000PlHl6QAF"}|0x340769d5
10:47:32.499 (3475832564)|STATEMENT_EXECUTE|[453]
10:47:32.499 (3475850099)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:4
10:47:32.499 (3475864308)|STATEMENT_EXECUTE|[455]
10:47:32.499 (3475871584)|METHOD_EXIT|[338]|01p3F0000083em6|ContactProcesses.getContact(Id)
10:47:32.499 (3475882926)|VARIABLE_SCOPE_BEGIN|[338]|toUpdate|Contact|true|false
10:47:32.499 (3475905588)|VARIABLE_ASSIGNMENT|[338]|toUpdate|{"Id":"0033F00000PlHl6QAF"}|0x340769d5
10:47:32.499 (3475914187)|STATEMENT_EXECUTE|[339]
10:47:32.499 (3475932368)|USER_DEBUG|[339]|DEBUG|Starting parse...
10:47:32.499 (3475952357)|STATEMENT_EXECUTE|[340]
10:47:32.499 (3476009777)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|{"givenContactList":"0x618bdcc8","oldContactMap":"0x2ca04f11","toCreateTaskLst":"0x3a02db51","updateAccountList":"0x3e2f50bd","updateContactList":"0x12e0c19c","updateMemDetails":"0x2d323294"}|0x530ffd91
10:47:32.499 (3476025773)|STATEMENT_EXECUTE|[18]
10:47:32.499 (3476029080)|STATEMENT_EXECUTE|[19]
10:47:32.499 (3476056285)|HEAP_ALLOCATE|[19]|Bytes:4
10:47:32.499 (3476072535)|VARIABLE_SCOPE_BEGIN|[19]|toReturn|Map<String,Integer>|true|false
10:47:32.499 (3476097545)|VARIABLE_ASSIGNMENT|[19]|toReturn|{}|0x2751196a
10:47:32.499 (3476107963)|STATEMENT_EXECUTE|[20]
10:47:32.499 (3476125943)|HEAP_ALLOCATE|[20]|Bytes:4
10:47:32.499 (3476138754)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:-4
10:47:32.499 (3476150759)|STATEMENT_EXECUTE|[21]
10:47:32.499 (3476162098)|HEAP_ALLOCATE|[21]|Bytes:4
10:47:32.499 (3476170527)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:-4
10:47:32.499 (3476180780)|STATEMENT_EXECUTE|[22]
10:47:32.499 (3476191046)|HEAP_ALLOCATE|[22]|Bytes:4
10:47:32.499 (3476199580)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:-4
10:47:32.499 (3476210315)|STATEMENT_EXECUTE|[23]
10:47:32.499 (3476220299)|HEAP_ALLOCATE|[23]|Bytes:4
10:47:32.499 (3476226521)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:-4
10:47:32.499 (3476237526)|STATEMENT_EXECUTE|[24]
10:47:32.499 (3476246385)|HEAP_ALLOCATE|[24]|Bytes:4
10:47:32.499 (3476254517)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:-4
10:47:32.499 (3476264530)|STATEMENT_EXECUTE|[25]
10:47:32.499 (3476274058)|HEAP_ALLOCATE|[25]|Bytes:4
10:47:32.499 (3476282039)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:-4
10:47:32.499 (3476291755)|STATEMENT_EXECUTE|[26]
10:47:32.499 (3476301126)|HEAP_ALLOCATE|[26]|Bytes:4
10:47:32.499 (3476308394)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:-4
10:47:32.499 (3476318556)|STATEMENT_EXECUTE|[27]
10:47:32.499 (3476328013)|HEAP_ALLOCATE|[27]|Bytes:4
10:47:32.499 (3476335088)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:-4
10:47:32.499 (3476345229)|STATEMENT_EXECUTE|[28]
10:47:32.499 (3476353675)|HEAP_ALLOCATE|[28]|Bytes:4
10:47:32.499 (3476361393)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:-4
10:47:32.499 (3476371677)|STATEMENT_EXECUTE|[29]
10:47:32.499 (3476380864)|HEAP_ALLOCATE|[29]|Bytes:4
10:47:32.499 (3476389683)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:-4
10:47:32.499 (3476399458)|STATEMENT_EXECUTE|[30]
10:47:32.499 (3476408111)|HEAP_ALLOCATE|[30]|Bytes:4
10:47:32.499 (3476415822)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:-4
10:47:32.499 (3476425953)|STATEMENT_EXECUTE|[31]
10:47:32.499 (3476434387)|HEAP_ALLOCATE|[31]|Bytes:4
10:47:32.499 (3476441942)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:-4
10:47:32.499 (3476451891)|STATEMENT_EXECUTE|[33]
10:47:32.499 (3476502570)|HEAP_ALLOCATE|[340]|Bytes:1
10:47:32.499 (3476534200)|HEAP_ALLOCATE|[340]|Bytes:8
10:47:32.499 (3476607951)|HEAP_ALLOCATE|[340]|Bytes:4
10:47:32.499 (3476692126)|VARIABLE_ASSIGNMENT|[340]|this.Birthdate|"2006-04-03T00:00:00.000Z"|0x340769d5
10:47:32.499 (3476701462)|STATEMENT_EXECUTE|[341]
10:47:32.499 (3476730202)|HEAP_ALLOCATE|[341]|Bytes:10
10:47:32.499 (3476749950)|HEAP_ALLOCATE|[341]|Bytes:33
10:47:32.499 (3476761112)|USER_DEBUG|[341]|DEBUG|This is the birthdate: 2006-04-03
10:47:32.499 (3476779353)|HEAP_ALLOCATE|[336]|Bytes:5
10:47:32.499 (3476794269)|VARIABLE_ASSIGNMENT|[336]|c|null|
10:47:32.499 (3476804168)|METHOD_EXIT|[312]|01p3F0000083em6|ContactProcesses.UpdateBirthdateOfContact()
10:47:32.499 (3476810310)|STATEMENT_EXECUTE|[314]
10:47:32.499 (3476817580)|METHOD_ENTRY|[314]|01p3F0000083em6|ContactProcesses.UpdateFieldsOfDeceasedContact()
10:47:32.499 (3476824211)|VARIABLE_SCOPE_BEGIN|[358]|this|ContactProcesses|true|false
10:47:32.499 (3476861730)|VARIABLE_ASSIGNMENT|[358]|this|{"givenContactList":"0x618bdcc8","oldContactMap":"0x2ca04f11","toCreateTaskLst":"0x3a02db51","updateAccountList":"0x3e2f50bd","updateContactList":"0x12e0c19c","updateMemDetails":"0x2d323294"}|0x530ffd91
10:47:32.499 (3476871226)|STATEMENT_EXECUTE|[358]
10:47:32.499 (3476891333)|HEAP_ALLOCATE|[359]|Bytes:5
10:47:32.499 (3476907467)|VARIABLE_SCOPE_BEGIN|[359]|c|Contact|true|false
10:47:32.499 (3478458939)|VARIABLE_ASSIGNMENT|[359]|c|{"LastModifiedDate":"2020-08-04T17:47:33.000Z","HasOptedOutOfFax":false,"Email_Correspondence_Only__c":false,"pi__Needs_Score_Synced__c":false,"AC_HIdden_InProgress_Activities_For_Week__c":0,"Do_Not_Call_At_Work__c":false,"Is_US_Contact__c":false,"Is_Anonymous__c":false,"IsDeleted":false,"Telemarketing_Opt_Out__c":false,"HiddenFlag__c":false,"Ambassador_Mail_Opt_Out__c":false,"Gender__c":"Male","MailingCity":"Hollbrook","Wedding_Anniversary_Day__c":"Unknown","Mail_Opt_Out__c":false,"Birthday_Day__c":"3","Org_Closed__c":false,"Id":"0033F00000PlHl6QAF","Greeting__c":"Friend","Created_Date_ADF__c":"2020-06-19T00:00:00.000Z","Is_Masterworks_Scoring__c":false,"Wedding_Anniversary_Year__c":"Unknown","Exclude_from_New_Ministry_Friend_Contact__c":false,"Spouse_Birthday_Year__c":"Unknown","DoNotCall":false,"Faith_Justice_Opt_Out__c":false,"Wedding_Anniversary_Month__c":"Unknown","MailingCountry":"USA","MailingState":"OR","Spouse_Birthday_Month__c":"Unknown","Do_Not_Mail__c":false,"OwnerId":"005f4000003ptcBAAQ","Addressee__c":"Test Street Caps","RecordTypeId":"012f4000000d6nlAAA","Is_Not_Presumed_Deceased__c":false,"AC_HiddenTriggerDate__c":"2020-06-24T20:35:37.000Z","Number_of_Newsletters_NL__c":"Eligible to Receive (8 more) ...","AC_Hidden_No_of_Open_Activities__c":0,"Likeminded_M_F__c":"Unknown","ADF_Foundation_Mail_Opt_Out__c":false,"Likeminded_Life__c":"Unknown","AC_HiddenForAmbassadorContact__c":false,"Is_Bad_Address__c":false,"AC_isCreatedAmbassador__c":false,"AC_Hidden_No_of_Closed_Events__c":0,"SystemModstamp":"2020-08-04T17:47:33.000Z","Import_From_RV1__c":false,"Appeals_Opt_Out__c":false,"Spouse_Birthday_Day__c":"Unknown","Age__c":14,"AccountId":"0013F00000YSUlmQAH","AC_UserName__c":"jdias#adflegal.org.j (7 more) ...","Spouse_Contact_Updated__c":false,"Birthday_Month__c":"April","CA_HiddenIsUserActive__c":false,"Address_Standardization_Status__c":"Standardization Pend (3 more) ...","AC_Duplicate_Contact_From_Ambassador__c":false,"Is_International_Contact__c":false,"Birthday_Year__c":"2006","Suffix__c":"Jr.","Is_Head_of_Household__c":false,"Faith_Justice__c":false,"CreatedById":"005f4000003ptcBAAQ","AC_Send_Ambasador_Captain_Email__c":false,"ADF_Duplicate_Check__c":false,"AC_Spouse_Interested_To_Be_Ambassador__c":false,"AC_Hidden_No_of_Open_Events__c":0,"IsEmailBounced":false,"Is_Email_Bounced__c":false,"HasOptedOutOfEmail":false,"Is_Spouse_Primary__c":false,"AMFEMs_Opt_Out__c":false,"Birthdate":"2006-04-03T00:00:00.000Z","Do_Not_Auto_Update__c":false,"AC_Total_Amount_Paid_By_Contact__c":0.00,"Former_Account__c":false,"Is_Presumed_Deceased__c":false,"CreatedDate":"2020-06-19T20:35:37.000Z","Received_New_Donor_Package__c":false,"LastName":"Test Street Caps","MailingStreet":"Crater\r\nGreat\r\nLakes","Is_Deceased__c":false,"AC_HIdden_Closed_Activities_For_Week__c":0,"Mailing_Address_Type__c":"Work","AC_Send_Ambassador_Reg_Email__c":false,"Receipts_Only_No_Other_Mail__c":false,"Contact_Record_ID__c":"CON-1309782","AC_HiddenYearTemplate__c":"2020","Is_Spouse_Deceased__c":false,"Account_Matches_Employee_Giving__c":false,"AC_Total_Amount_Paid_By_Ambassador_Conta__c":0.00,"Application_Shield_Contact__c":false,"Receipts_Opt_Out__c":false,"Is_Legal_Contact__c":false,"Contact_18_Character_ID__c":"0033F00000PlHl6QAF","Newsletter_NL_Opt_Out__c":false,"International_Dialing_Code__c":"1","Duplicate_Match_Check_Status__c":"Needs Check","Do_Not_Email__c":false,"AC_IsEmailSent__c":false,"AC_Hidden_No_of_InProgress_Tasks__c":0,"Email_Appeals__c":false,"Acknowledgement_Sent__c":false,"pi__pardot_hard_bounced__c":false,"AC_Hidden_No_of_Closed_Activities__c":0,"Pillars_of_Freedom_Mail_Opt_Out__c":false,"LastModifiedById":"005f4000003ptcBAAQ","Is_VIP__c":false,"Likeminded_Religious_Liberty__c":"Unknown"}|0x2b45fd99
10:47:32.499 (3479014072)|STATEMENT_EXECUTE|[359]
10:47:32.499 (3479034935)|STATEMENT_EXECUTE|[360]
10:47:32.499 (3479052720)|HEAP_ALLOCATE|[359]|Bytes:5
10:47:32.499 (3479073822)|VARIABLE_ASSIGNMENT|[359]|c|null|
10:47:32.499 (3479084396)|METHOD_EXIT|[314]|01p3F0000083em6|ContactProcesses.UpdateFieldsOfDeceasedContact()
10:47:32.499 (3479090908)|STATEMENT_EXECUTE|[315]
10:47:32.499 (3479097792)|METHOD_ENTRY|[315]|01p3F0000083em6|ContactProcesses.updateContacts()
10:47:32.499 (3479105112)|VARIABLE_SCOPE_BEGIN|[407]|this|ContactProcesses|true|false
10:47:32.499 (3479149643)|VARIABLE_ASSIGNMENT|[407]|this|{"givenContactList":"0x618bdcc8","oldContactMap":"0x2ca04f11","toCreateTaskLst":"0x3a02db51","updateAccountList":"0x3e2f50bd","updateContactList":"0x12e0c19c","updateMemDetails":"0x2d323294"}|0x530ffd91
10:47:32.499 (3479159316)|STATEMENT_EXECUTE|[407]
10:47:32.499 (3479161462)|STATEMENT_EXECUTE|[408]
10:47:32.499 (3479166852)|VARIABLE_SCOPE_BEGIN|[408]|toReturn|Integer|false|false
10:47:32.499 (3479175124)|HEAP_ALLOCATE|[408]|Bytes:4
10:47:32.499 (3479183719)|VARIABLE_ASSIGNMENT|[408]|toReturn|0
10:47:32.499 (3479188834)|STATEMENT_EXECUTE|[409]
10:47:32.499 (3479218454)|HEAP_ALLOCATE|[409]|Bytes:1
10:47:32.499 (3479232786)|HEAP_ALLOCATE|[409]|Bytes:9
10:47:32.499 (3479243875)|USER_DEBUG|[409]|DEBUG|Size is 1
10:47:32.499 (3479261193)|STATEMENT_EXECUTE|[410]
10:47:32.499 (3479271967)|HEAP_ALLOCATE|[410]|Bytes:12
10:47:32.499 (3479325703)|HEAP_ALLOCATE|[410]|Bytes:62
10:47:32.499 (3479340890)|HEAP_ALLOCATE|[410]|Bytes:73
10:47:32.499 (3479349099)|USER_DEBUG|[410]|DEBUG|Contact is Contact:{Id=0033F00000PlHl6QAF, Birthdate=2006-04-03 00:00:00}
10:47:32.499 (3479365497)|STATEMENT_EXECUTE|[411]
10:47:32.499 (3479368054)|STATEMENT_EXECUTE|[412]
10:47:32.499 (3479418056)|DML_BEGIN|[412]|Op:Update|Type:Contact|Rows:1
10:47:32.499 (3479456828)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:8
10:47:32.499 (3498519660)|DML_END|[412]
10:47:33.499 (3499175213)|FATAL_ERROR|Internal Salesforce.com Error

It looks like you can use the static class property pattern to avoid trigger endless recursion.
See here:
https://developer.salesforce.com/forums/?id=906F0000000Qtw4IAC

Related

Can't restore a flink job that uses Table API and Kafka connector with savepoint

I canceled a flink job with a savepoint, then tried to restore the job with the savepoint (just using the same jar file) but it said it cannot map savepoint state. I was just using the same jar file so I think the execution plan should be the same? Why would it have a new operator id if I didn't change the code? I wonder if it's possible to restore from savepoint for a job using Kafka connector & Table API.
Related errors:
used by: java.util.concurrent.CompletionException: java.lang.IllegalStateException: Failed to rollback to checkpoint/savepoint file:/root/flink-savepoints/savepoint-5f285c-c2749410db07. Cannot map checkpoint/savepoint state for operator dd5fc1f28f42d777f818e2e8ea18c331 to the new program, because the operator is not available in the new program. If you want to allow to skip this, you can set the --allowNonRestoredState option on the CLI.
used by: java.lang.IllegalStateException: Failed to rollback to checkpoint/savepoint file:/root/flink-savepoints/savepoint-5f285c-c2749410db07. Cannot map checkpoint/savepoint state for operator dd5fc1f28f42d777f818e2e8ea18c331 to the new program, because the operator is not available in the new program. If you want to allow to skip this, you can set the --allowNonRestoredState option on the CLI.
My Code:
public final class FlinkJob {
public static void main(String[] args) {
final String JOB_NAME = "FlinkJob";
final EnvironmentSettings settings = EnvironmentSettings.inStreamingMode();
final TableEnvironment tEnv = TableEnvironment.create(settings);
tEnv.getConfig().set("pipeline.name", JOB_NAME);
tEnv.getConfig().setLocalTimeZone(ZoneId.of("UTC"));
tEnv.executeSql("CREATE TEMPORARY TABLE ApiLog (" +
" `_timestamp` TIMESTAMP(3) METADATA FROM 'timestamp' VIRTUAL," +
" `_partition` INT METADATA FROM 'partition' VIRTUAL," +
" `_offset` BIGINT METADATA FROM 'offset' VIRTUAL," +
" `Data` STRING," +
" `Action` STRING," +
" `ProduceDateTime` TIMESTAMP_LTZ(6)," +
" `OffSet` INT" +
") WITH (" +
" 'connector' = 'kafka'," +
" 'topic' = 'api.log'," +
" 'properties.group.id' = 'flink'," +
" 'properties.bootstrap.servers' = '<mykafkahost...>'," +
" 'format' = 'json'," +
" 'json.timestamp-format.standard' = 'ISO-8601'" +
")");
tEnv.executeSql("CREATE TABLE print_table (" +
" `_timestamp` TIMESTAMP(3)," +
" `_partition` INT," +
" `_offset` BIGINT," +
" `Data` STRING," +
" `Action` STRING," +
" `ProduceDateTime` TIMESTAMP(6)," +
" `OffSet` INT" +
") WITH ('connector' = 'print')");
tEnv.executeSql("INSERT INTO print_table" +
" SELECT * FROM ApiLog");
}
}

Escape Special Character In Solr

I'm getting following error while escaping special character '&' after running http://localhost:8983/solr/amazon_products/select?q=*:*&fq=Category:"Toys \& Games "
this query in Solr
{
"responseHeader": {
"zkConnected": true,
"status": 400,
"QTime": 0,
"params": {
"q": "*:*",
"Games \"": "",
"fq": "Category:\"Toys \\",
"rows": "70"
}
},
"error": {
"metadata": [
"error-class", "org.apache.solr.common.SolrException",
"root-error-class", "org.apache.solr.parser.TokenMgrError"
],
"msg": "org.apache.solr.search.SyntaxError: Cannot parse 'Category:\"Toys \\': Lexical error at line 1, column 17. Encountered: <EOF> after : \"\\\"Toys \\\\\"",
"code": 400
}}
Category field contains values like below
"Category":["Toys & Games "," Learning & Education "," Science Kits & Toys"]
"Category":["Home & Kitchen "," Home Décor "," Window Treatments "," Window Stickers & Films ", " Window Films"],
And category field is of type string with multivalued=true
{
"name":"Category",
"type":"string",
"multiValued":true,
"stored":true},
How to search properly for Category:"Toys & Games "
NOTE: I tried http://localhost:8983/solr/amazon_products/select?q=*:*&fq=Category:Toys* AND *"Games "&rows=70 this query and it worked fine, but If I excatly want to serach for string 'Toys & Games ' how to do that by properly escaping special character '&'
You'll need to encode some of the characters. For example the following command:
$ curl 'http://localhost:8983/solr/puldata/select?fq=title_t%3A%22Woody%20Herman%20%26%20His%20Orchestra%22&q=*&start=0'
will query fq=title_t:"Woody Herman & His Orchestra". Notice how the :, ", spaces, and the & characters are encoded.

priotizing a message on Google Pubsub

I have a pubsub topic with a number of pull subscriptions. I would like some mechanism where I can publish a message with a "priority" label that causes the message to jump as near to the front of the queue as possible.
I don't need any guaranteed ordering semantics, just a "best effort" prioritization mechanism.
Is anything like this possible with pubsub?
No such mechanism exists within Google Cloud Pub/Sub, no. Such a feature really only becomes relevant if your subscribers are not able to keep up with the rate of publishing and consequently, a backlog is building up. If subscribers are keeping up and processing and acking messages quickly, then the notion of "priority" messages isn't really necessary.
If a backlog is being built up and some messages needs to be processed with higher priority, then one approach is to create a "high-priority" topic and subscription. The subscribers subscribe to this subscription as well as the "normal" subscription and prioritize processing messages from the "high-priority" subscription whenever they arrive.
Providing an example implementation to #Kamal's answer in an attempt to provide more context to:
...prioritize processing messages from the "high-priority" subscription whenever they arrive
import logging
import threading
from google.cloud import pubsub
from google.cloud.pubsub_v1.types import FlowControl
logging.basicConfig(format="%(asctime)s %(message)s", level=logging.INFO)
c = threading.Condition()
n_priority_messages = 0
def priority_callback(message):
logging.info(f"PRIORITY received: {message.message_id}")
global n_priority_messages
c.acquire()
n_priority_messages += 1
c.release()
handle_message(message)
logging.info(f"PRIORITY handled: {message.message_id}")
c.acquire()
n_priority_messages -= 1
if n_priority_messages == 0:
c.notify_all()
c.release()
def batch_callback(message):
logging.info(f"BATCH received: {message.message_id}")
done = False
modify_count = 0
global n_priority_messages
while not done:
c.acquire()
priority_queue_is_empty = n_priority_messages == 0
c.release()
if priority_queue_is_empty:
handle_message(message)
logging.info(f"BATCH handled: {message.message_id}")
done = True
else:
message.modify_ack_deadline(15)
modify_count += 1
logging.info(
f"BATCH modifyed deadline: {message.message_id} - count: {modify_count}"
)
c.acquire()
c.wait(timeout=10)
c.release()
subscriber = pubsub.SubscriberClient()
subscriber.subscribe(
subscription=batch_subscription,
callback=batch_callback,
# adjust according to latency/throughput requirements
flow_control=FlowControl(max_messages=5)
)
pull_future = subscriber.subscribe(
subscription=priority_subscription,
callback=priority_callback,
# adjust according to latency/throughput requirements
flow_control=FlowControl(max_messages=2)
)
pull_future.result()
Example output when there is a backlog of priority and batch messages:
...
2021-07-29 10:25:00,115 PRIORITY received: 2786647736421842
2021-07-29 10:25:00,338 PRIORITY handled: 2786647736421841
2021-07-29 10:25:00,392 PRIORITY received: 2786647736421843
2021-07-29 10:25:02,899 BATCH modifyed deadline: 2786667941800415 - count: 2
2021-07-29 10:25:03,016 BATCH modifyed deadline: 2786667941800416 - count: 2
2021-07-29 10:25:03,016 BATCH modifyed deadline: 2786667941800417 - count: 2
2021-07-29 10:25:03,109 BATCH modifyed deadline: 2786667941800418 - count: 2
2021-07-29 10:25:03,109 BATCH modifyed deadline: 2786667941800419 - count: 2
2021-07-29 10:25:03,654 PRIORITY handled: 2786647736421842
2021-07-29 10:25:03,703 PRIORITY received: 2786647736421844
2021-07-29 10:25:03,906 PRIORITY handled: 2786647736421843
2021-07-29 10:25:03,948 PRIORITY received: 2786647736421845
2021-07-29 10:25:07,212 PRIORITY handled: 2786647736421844
2021-07-29 10:25:07,242 PRIORITY received: 2786647736421846
2021-07-29 10:25:07,459 PRIORITY handled: 2786647736421845
2021-07-29 10:25:07,503 PRIORITY received: 2786647736421847
2021-07-29 10:25:10,764 PRIORITY handled: 2786647736421846
2021-07-29 10:25:10,807 PRIORITY received: 2786647736421848
2021-07-29 10:25:11,004 PRIORITY handled: 2786647736421847
2021-07-29 10:25:11,061 PRIORITY received: 2786647736421849
2021-07-29 10:25:12,900 BATCH modifyed deadline: 2786667941800415 - count: 3
2021-07-29 10:25:13,016 BATCH modifyed deadline: 2786667941800416 - count: 3
2021-07-29 10:25:13,017 BATCH modifyed deadline: 2786667941800417 - count: 3
2021-07-29 10:25:13,110 BATCH modifyed deadline: 2786667941800418 - count: 3
2021-07-29 10:25:13,110 BATCH modifyed deadline: 2786667941800419 - count: 3
2021-07-29 10:25:14,392 PRIORITY handled: 2786647736421848
2021-07-29 10:25:14,437 PRIORITY received: 2786647736421850
2021-07-29 10:25:14,558 PRIORITY handled: 2786647736421849
...

Uploading files into Google Cloud Storage: 500 Backend Error

We are trying to upload files into Google Cloud Storage before moving them into BigQuery, but we are often facing '500 Internal Server Error' or '410 Gone' (raw messages below) during some uploads.
We are using the official SDK and have added retry with exponential backoff but the errors are always here. Do you have any advise please ?
Here is how we upload (scala) :
val credential = new GoogleCredential().setAccessToken(accessToken)
val requestInitializer = new HttpRequestInitializer() {
def initialize(request: HttpRequest): Unit = {
credential.initialize(request)
// to avoid read timed out exception
request.setConnectTimeout(200000)
request.setReadTimeout(200000)
request.setIOExceptionHandler(new
HttpBackOffIOExceptionHandler(new ExponentialBackOff()))
request.setUnsuccessfulResponseHandler(new
HttpBackOffUnsuccessfulResponseHandler(new ExponentialBackOff()))
}
}
val storage = new Storage.Builder(
new NetHttpTransport,
JacksonFactory.getDefaultInstance,
requestInitializer
).setApplicationName("MyAppHere").build
val objectMetadata = new StorageObject()
.setBucket(bucketName)
.setName(distantFileName)
val isc = new InputStreamContent("binary/octet-stream", fis)
val length = isc.getLength
val insertObject = storage.objects().insert(bucketName, objectMetadata, isc)
// For small files, you may wish to call setDirectUploadEnabled(true), to
// reduce the number of HTTP requests made to the server.
if (length > 0 && length <= 2 * 1000 * 1000 /* 2MB */ ) {
insertObject.getMediaHttpUploader.setDirectUploadEnabled(true)
}
insertObject.execute()
Our scala dependancies :
"com.google.api-client" % "google-api-client" % "1.18.0-rc",
"com.google.api-client" % "google-api-client-jackson2" % "1.18.0-rc",
"com.google.apis" % "google-api-services-bigquery" % "v2-rev142-1.18.0-rc",
"com.google.apis" % "google-api-services-storage" % "v1-rev1-1.18.0-rc",
"com.google.http-client" % "google-http-client" % "1.18.0-rc",
"com.google.oauth-client" % "google-oauth-client" % "1.18.0-rc"
Raw SDK error responses :
500 Internal Server Error
{
"code" : 500,
"errors" : [ {
"domain" : "global",
"message" : "Backend Error",
"reason" : "backendError"
} ],
"message" : "Backend Error"
}
410 Gone
{
"code" : 500,
"errors" : [ {
"domain" : "global",
"message" : "Backend Error",
"reason" : "backendError"
} ],
"message" : "Backend Error"
}
Every Backend error should be handled with an exponential retry, as there might be service problems.
If the error still persists after let's say 10 hours then you should contact the support in order to provide you 1:1 help to your problem.

org.apache.solr.search.SyntaxError: Cannot parse sku_str

See below error:
"error": {
"msg": "org.apache.solr.search.SyntaxError: Cannot parse 'sku_str:VFY:A5440M35A5ME': Encountered \" \":\" \": \"\" at line 1,
column 11.
code": 400 }
Escape solr query string , See below function
SolrUtils::escapeQueryChars — Escapes a lucene query string
http://php.net/manual/en/solrutils.escapequerychars.php

Resources