Skip to content

Optional configurations for Sql Trigger are not respected #1019

@ben-ward1

Description

@ben-ward1
  • Azure Functions SQL Extension or Extension Bundle Version: 3.0.461
  • Is this a deployed or local function: both
  • What type of Database are you using?
    • deployed:
      • Version: Microsoft SQL Azure (RTM) - 12.0.2000.8 Nov 2 2023 01:40:17 Copyright (C) 2022 Microsoft Corporation
      • Engine: 5
    • local:
      • Version: Microsoft SQL Server 2019 (RTM-GDR) (KB5029377) - 15.0.2104.1 (X64) Aug 16 2023 00:09:21 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows 10 Pro 10.0 (Build 19045: ) (Hypervisor)
      • Engine: 3

Steps to Reproduce (local):

  1. Create sql trigger function
  2. Add these values to local.settings.json
{
  ... other configs
  "Sql_Trigger_BatchSize": 1,
  "Sql_Trigger_PollingIntervalMs": 30000
}
  1. Configure trigger with table name, connection string
  2. Enable change tracking on db and table
  3. Insert multiple rows into target table

Referencing the documentation here, I would expect that with the config values above, only a single record would process every 30 seconds. It actually executes with the defaults. Same behavior is observed in deployed environment with these same values as application settings. Application insight traces read: SqlOptions { "MaxBatchSize": 100, "PollingIntervalMs": 1000, "MaxChangesPerWorker": 1000 }

I believed these configs should be set as app settings based on this comment and associated PR. Let me know if I am mistaken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions