IDEMPIERE-4764 Hazelcast distributed cache can be an issue in some environments (#655)
* IDEMPIERE-4764 Hazelcast distributed cache can be an issue in some environments - Change setting for all caches to be non-distributed * IDEMPIERE-4764 Hazelcast distributed cache can be an issue in some environments * TC-324 Fix cache related monitoring and performance issues - PO & GridTable call to CacheMgt reset should be async. Co-authored-by: hengsin <hengsin@gmail.com>
This commit is contained in:
parent
4de94e3d21
commit
8f31506ac7
|
@ -2159,7 +2159,7 @@ public class GridTable extends AbstractTableModel
|
||||||
return SAVE_ERROR;
|
return SAVE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
CacheMgt.get().reset(m_tableName);
|
Adempiere.getThreadPoolExecutor().submit(() -> CacheMgt.get().reset(m_tableName));
|
||||||
|
|
||||||
// everything ok
|
// everything ok
|
||||||
m_rowData = null;
|
m_rowData = null;
|
||||||
|
|
|
@ -181,9 +181,9 @@ public class MAcctSchema extends X_C_AcctSchema implements ImmutablePOSupport
|
||||||
} // getClientAcctSchema
|
} // getClientAcctSchema
|
||||||
|
|
||||||
/** Cache of Client AcctSchema Arrays **/
|
/** Cache of Client AcctSchema Arrays **/
|
||||||
private static CCache<Integer,MAcctSchema[]> s_schema = new CCache<Integer,MAcctSchema[]>(I_AD_ClientInfo.Table_Name, I_AD_ClientInfo.Table_Name+"|MAcctSchema[]", 3, 120, true); // 3 clients
|
private static CCache<Integer,MAcctSchema[]> s_schema = new CCache<Integer,MAcctSchema[]>(I_AD_ClientInfo.Table_Name, I_AD_ClientInfo.Table_Name+"|MAcctSchema[]", 3, 120, false); // 3 clients
|
||||||
/** Cache of AcctSchemas **/
|
/** Cache of AcctSchemas **/
|
||||||
private static ImmutableIntPOCache<Integer,MAcctSchema> s_cache = new ImmutableIntPOCache<Integer,MAcctSchema>(Table_Name, 3, 120, true); // 3 accounting schemas
|
private static ImmutableIntPOCache<Integer,MAcctSchema> s_cache = new ImmutableIntPOCache<Integer,MAcctSchema>(Table_Name, 3, 120); // 3 accounting schemas
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
|
|
|
@ -135,7 +135,7 @@ public class MClient extends X_AD_Client implements ImmutablePOSupport
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
private static CLogger s_log = CLogger.getCLogger (MClient.class);
|
private static CLogger s_log = CLogger.getCLogger (MClient.class);
|
||||||
/** Cache */
|
/** Cache */
|
||||||
private static ImmutableIntPOCache<Integer,MClient> s_cache = new ImmutableIntPOCache<Integer,MClient>(Table_Name, 3, 120, true);
|
private static ImmutableIntPOCache<Integer,MClient> s_cache = new ImmutableIntPOCache<Integer,MClient>(Table_Name, 3, 120);
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
|
|
|
@ -238,7 +238,7 @@ public class MSysConfig extends X_AD_SysConfig
|
||||||
/** Static Logger */
|
/** Static Logger */
|
||||||
private static CLogger s_log = CLogger.getCLogger (MSysConfig.class);
|
private static CLogger s_log = CLogger.getCLogger (MSysConfig.class);
|
||||||
/** Cache */
|
/** Cache */
|
||||||
private static CCache<String, String> s_cache = new CCache<String, String>(Table_Name, 40, 0, true);
|
private static CCache<String, String> s_cache = new CCache<String, String>(Table_Name, 40, 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get system configuration property of type string
|
* Get system configuration property of type string
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class MSystem extends X_AD_System
|
||||||
} // get
|
} // get
|
||||||
|
|
||||||
/** System - cached */
|
/** System - cached */
|
||||||
private static CCache<Integer,MSystem> s_system = new CCache<Integer,MSystem>(Table_Name, 1, -1, true);
|
private static CCache<Integer,MSystem> s_system = new CCache<Integer,MSystem>(Table_Name, 1, -1);
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* Default Constructor
|
* Default Constructor
|
||||||
|
|
|
@ -2456,10 +2456,10 @@ public abstract class PO
|
||||||
m_createNew = false;
|
m_createNew = false;
|
||||||
}
|
}
|
||||||
if (!newRecord) {
|
if (!newRecord) {
|
||||||
CacheMgt.get().reset(p_info.getTableName(), get_ID());
|
Adempiere.getThreadPoolExecutor().submit(() -> CacheMgt.get().reset(p_info.getTableName()));
|
||||||
MRecentItem.clearLabel(p_info.getAD_Table_ID(), get_ID());
|
MRecentItem.clearLabel(p_info.getAD_Table_ID(), get_ID());
|
||||||
} else if (get_ID() > 0 && success)
|
} else if (get_ID() > 0 && success)
|
||||||
CacheMgt.get().newRecord(p_info.getTableName(), get_ID());
|
Adempiere.getThreadPoolExecutor().submit(() -> CacheMgt.get().newRecord(p_info.getTableName(), get_ID()));
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
} // saveFinish
|
} // saveFinish
|
||||||
|
@ -3640,7 +3640,7 @@ public abstract class PO
|
||||||
int size = p_info.getColumnCount();
|
int size = p_info.getColumnCount();
|
||||||
m_oldValues = new Object[size];
|
m_oldValues = new Object[size];
|
||||||
m_newValues = new Object[size];
|
m_newValues = new Object[size];
|
||||||
CacheMgt.get().reset(p_info.getTableName(), Record_ID);
|
Adempiere.getThreadPoolExecutor().submit(() -> CacheMgt.get().reset(p_info.getTableName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|
|
@ -106,7 +106,7 @@ public class TranslationTable
|
||||||
private static Integer s_activeLanguages = null;
|
private static Integer s_activeLanguages = null;
|
||||||
|
|
||||||
/** Cache */
|
/** Cache */
|
||||||
private static CCache<String,TranslationTable> s_cache = new CCache<String,TranslationTable>(null, "TranslationTable", 20, true);
|
private static CCache<String,TranslationTable> s_cache = new CCache<String,TranslationTable>(null, "TranslationTable", 20);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -85,7 +85,7 @@ public class Scheduler extends AdempiereServer
|
||||||
|
|
||||||
protected int AD_Scheduler_ID;
|
protected int AD_Scheduler_ID;
|
||||||
|
|
||||||
private static ImmutableIntPOCache<Integer,MScheduler> s_cache = new ImmutableIntPOCache<Integer,MScheduler>(MScheduler.Table_Name, 10, 60, true);
|
private static ImmutableIntPOCache<Integer,MScheduler> s_cache = new ImmutableIntPOCache<Integer,MScheduler>(MScheduler.Table_Name, 10, 60);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Work
|
* Work
|
||||||
|
|
|
@ -591,7 +591,7 @@ public class WChosenboxListEditor extends WEditor implements ContextMenuListener
|
||||||
private WChosenboxListEditor editor;
|
private WChosenboxListEditor editor;
|
||||||
|
|
||||||
protected CCacheListener(String tableName, WChosenboxListEditor editor) {
|
protected CCacheListener(String tableName, WChosenboxListEditor editor) {
|
||||||
super(tableName, tableName, 0, true);
|
super(tableName, tableName+"|CCacheListener", 0, false);
|
||||||
this.editor = editor;
|
this.editor = editor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -949,7 +949,7 @@ ContextMenuListener, IZoomableEditor
|
||||||
private WTableDirEditor editor;
|
private WTableDirEditor editor;
|
||||||
|
|
||||||
protected CCacheListener(String tableName, WTableDirEditor editor) {
|
protected CCacheListener(String tableName, WTableDirEditor editor) {
|
||||||
super(tableName, tableName+"|CCacheListener", 0, 0, true);
|
super(tableName, tableName+"|CCacheListener", 0, 0, false);
|
||||||
this.editor = editor;
|
this.editor = editor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue