Azure / Azure/azure-functions-sql-extension

Decide what to do with AZ_FUNC_TABLE_INFO_CACHE_TIMEOUT_MINUTES

Open
#895 0 comments 0 reactions 0 assignees View on GitHub
output-binding P2 Triage: Done
Dominant language
C#
Stars
130
Forks
71
Avg merge
4d 8h
Merged PRs (30d)
4

Description

This was added in https://github.com/Azure/azure-functions-sql-extension/pull/395 but then the test it was added for was later remove d in https://github.com/Azure/azure-functions-sql-extension/pull/560, so it's not currently being used. And it's not documented anywhere for customers to be able to use themselves.

Questions we should ask:

- Do we still want/need this? It happened to be useful in https://github.com/Azure/azure-functions-sql-extension/issues/891, but that's a bug and not something we normally intend
- Do we need this caching at all? Can we refactor the bindings to get all the column info for a table and be fine with that never changing for the lifetime of the function? (we already say that changes to the table while a function is running may have unexpected behavior)

If we do keep it, we should consider moving the parsing logic out of the UpsertRowsAsync method. We only need to calculate the value once at startup - so calculating it each time an insert is done is just wasted effort.

Contributor guide

Open the contributing guide

Research direction

Review PR #395 and PR #560, then trace AZ_FUNC_TABLE_INFO_CACHE_TIMEOUT_MINUTES and the UpsertRowsAsync entry point, using issue #891 as a behavior reference. Done means reaching and documenting a decision about whether the cache is needed and, if retained, how its startup-time parsing should be handled.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp, sql
Domain
backend, databases
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.