Skip to content

Commit

Permalink
remove partition cache entrance
Browse files Browse the repository at this point in the history
  • Loading branch information
924060929 committed May 16, 2024
1 parent 87a7ab9 commit 94e6bf9
Show file tree
Hide file tree
Showing 5 changed files with 508 additions and 529 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1303,13 +1303,6 @@ public class Config extends ConfigBase {
@ConfField(mutable = true, masterOnly = false)
public static boolean cache_enable_sql_mode = true;

/**
* If set to true, fe will get data from be cache,
* This option is suitable for real-time updating of partial partitions.
*/
@ConfField(mutable = true, masterOnly = false)
public static boolean cache_enable_partition_mode = true;

/**
* Minimum interval between last version when caching results,
* This parameter distinguishes between offline and real-time updates
Expand Down
12 changes: 0 additions & 12 deletions fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ public class SessionVariable implements Serializable, Writable {
public static final String ENABLE_REWRITE_ELEMENT_AT_TO_SLOT = "enable_rewrite_element_at_to_slot";
public static final String ENABLE_ODBC_TRANSCATION = "enable_odbc_transcation";
public static final String ENABLE_SQL_CACHE = "enable_sql_cache";
public static final String ENABLE_PARTITION_CACHE = "enable_partition_cache";

public static final String ENABLE_COST_BASED_JOIN_REORDER = "enable_cost_based_join_reorder";

Expand Down Expand Up @@ -858,9 +857,6 @@ public class SessionVariable implements Serializable, Writable {
@VariableMgr.VarAttr(name = ENABLE_SQL_CACHE)
public boolean enableSqlCache = false;

@VariableMgr.VarAttr(name = ENABLE_PARTITION_CACHE)
public boolean enablePartitionCache = false;

@VariableMgr.VarAttr(name = FORWARD_TO_MASTER)
public boolean forwardToMaster = true;

Expand Down Expand Up @@ -2475,14 +2471,6 @@ public void setEnableSqlCache(boolean enableSqlCache) {
this.enableSqlCache = enableSqlCache;
}

public boolean isEnablePartitionCache() {
return enablePartitionCache;
}

public void setEnablePartitionCache(boolean enablePartitionCache) {
this.enablePartitionCache = enablePartitionCache;
}

public int getPartitionedHashJoinRowsThreshold() {
return partitionedHashJoinRowsThreshold;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,12 @@ private void checkCacheConfig() {
enableSqlCache = true;
}
}
if (Config.cache_enable_partition_mode) {
if (context.getSessionVariable().isEnablePartitionCache()) {
enablePartitionCache = true;
}
}
enablePartitionCache = false;
// if (Config.cache_enable_partition_mode) {
// if (context.getSessionVariable().isEnablePartitionCache()) {
// enablePartitionCache = true;
// }
// }
}

public TUniqueId getQueryId() {
Expand Down Expand Up @@ -206,8 +207,9 @@ public boolean enablePartitionCache() {
}

public static boolean canUseCache(SessionVariable sessionVariable) {
return (sessionVariable.isEnableSqlCache() || sessionVariable.isEnablePartitionCache())
&& commonCacheCondition(sessionVariable);
// return (sessionVariable.isEnableSqlCache() || sessionVariable.isEnablePartitionCache())
// && commonCacheCondition(sessionVariable);
return (sessionVariable.isEnableSqlCache()) && commonCacheCondition(sessionVariable);
}

public static boolean canUseSqlCache(SessionVariable sessionVariable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected void runBeforeAll() throws Exception {
FeConstants.runningUnitTest = true;
Config.enable_query_hive_views = true;
Config.cache_enable_sql_mode = true;
Config.cache_enable_partition_mode = true;
// Config.cache_enable_partition_mode = true;
connectContext.getSessionVariable().setEnableSqlCache(true);

env = Env.getCurrentEnv();
Expand Down
Loading

0 comments on commit 94e6bf9

Please sign in to comment.