Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion redisinsight/api/src/common/constants/recommendations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ export const COMBINE_SMALL_STRINGS_TO_HASHES_RECOMMENDATION_KEYS_COUNT = 10;
export const SEARCH_HASH_RECOMMENDATION_KEYS_FOR_CHECK = 50;
export const SEARCH_HASH_RECOMMENDATION_KEYS_LENGTH = 2;
export const RTS_KEYS_FOR_CHECK = 100;
export const LUA_TO_FUNCTIONS_RECOMMENDATION_COUNT = 0;
3 changes: 0 additions & 3 deletions redisinsight/api/src/constants/recommendations.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export const RECOMMENDATION_NAMES = Object.freeze({
LUA_SCRIPT: 'luaScript',
LUA_TO_FUNCTIONS: 'luaToFunctions',
BIG_HASHES: 'bigHashes',
BIG_STRINGS: 'bigStrings',
BIG_SETS: 'bigSets',
Expand All @@ -21,8 +20,6 @@ export const RECOMMENDATION_NAMES = Object.freeze({
STRING_TO_JSON: 'stringToJson',
SEARCH_VISUALIZATION: 'searchVisualization',
SEARCH_HASH: 'searchHash',
FUNCTIONS_WITH_KEYSPACE: 'functionsWithKeyspace',
FUNCTIONS_WITH_STREAMS: 'functionsWithStreams',
});

export const ONE_NODE_RECOMMENDATIONS = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,19 +190,12 @@ describe('KeysService', () => {
{ keys: [getKeyInfoResponse.name] },
);

expect(recommendationService.check).toBeCalledTimes(2);
expect(recommendationService.check).toBeCalledTimes(1);
expect(recommendationService.check).toBeCalledWith(
mockBrowserClientMetadata,
RECOMMENDATION_NAMES.SEARCH_JSON,
{ keys: result, client: mockStandaloneRedisClient, databaseId: mockBrowserClientMetadata.databaseId },
);
expect(recommendationService.check).toBeCalledWith(
mockBrowserClientMetadata,
RECOMMENDATION_NAMES.FUNCTIONS_WITH_STREAMS,
{ keys: result, client: mockStandaloneRedisClient, databaseId: mockBrowserClientMetadata.databaseId },
);

expect(recommendationService.check).toBeCalledTimes(2);
});
it("user don't have required permissions for getKeyInfo", async () => {
const replyError: ReplyError = {
Expand Down
5 changes: 0 additions & 5 deletions redisinsight/api/src/modules/browser/keys/keys.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,6 @@ export class KeysService {
RECOMMENDATION_NAMES.SEARCH_JSON,
{ keys: result, client, databaseId: clientMetadata.databaseId },
);
this.recommendationService.check(
clientMetadata,
RECOMMENDATION_NAMES.FUNCTIONS_WITH_STREAMS,
{ keys: result, client, databaseId: clientMetadata.databaseId },
);

return plainToClass(GetKeyInfoResponse, result);
} catch (error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ import {
BigStringStrategy,
CompressionForListStrategy,
BigAmountConnectedClientsStrategy,
FunctionsWithStreamsStrategy,
FunctionsWithKeyspaceStrategy,
LuaToFunctionsStrategy,
} from 'src/modules/database-recommendation/scanner/strategies';

@Injectable()
Expand All @@ -46,9 +43,6 @@ export class RecommendationProvider {
this.strategies.set(RECOMMENDATION_NAMES.BIG_STRINGS, new BigStringStrategy());
this.strategies.set(RECOMMENDATION_NAMES.COMPRESSION_FOR_LIST, new CompressionForListStrategy());
this.strategies.set(RECOMMENDATION_NAMES.BIG_AMOUNT_OF_CONNECTED_CLIENTS, new BigAmountConnectedClientsStrategy());
this.strategies.set(RECOMMENDATION_NAMES.FUNCTIONS_WITH_STREAMS, new FunctionsWithStreamsStrategy(databaseService));
this.strategies.set(RECOMMENDATION_NAMES.LUA_TO_FUNCTIONS, new LuaToFunctionsStrategy(databaseService));
this.strategies.set(RECOMMENDATION_NAMES.FUNCTIONS_WITH_KEYSPACE, new FunctionsWithKeyspaceStrategy(databaseService));
}

getStrategy(type: string): IRecommendationStrategy {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@ export * from './avoid-lua-scripts.strategy';
export * from './big-string.strategy';
export * from './compression-for-list.strategy';
export * from './big-amount-connected-clients.strategy';
export * from './functions-with-streams.strategy';
export * from './lua-to-functions.strategy';
export * from './functions-with-keyspace.strategy';
Loading