Skip to content

feat(config): let the engine control SystemConfig defaults - #18

Open
adsharma wants to merge 1 commit into
mainfrom
engine-controlled-defaults
Open

adsharma wants to merge 1 commit into
mainfrom
engine-controlled-defaults

Conversation

@adsharma

Copy link
Copy Markdown
Contributor

Follow-up to #17 (which simply flipped the default): instead of pinning a copy of every engine default in this binding, SystemConfig fields are now boxed (Long/Boolean) defaulting to null = "use the engine default".

  • SystemConfig.java: boxed fields, null defaults.
  • Database.java: no-config constructors pass all nulls (pure engine defaults); the legacy 9-arg overload passes nulls for the fields it predates (maxNumThreads, enableMultiWrites, enableDefaultHashIndex).
  • Native.java: legacy lbugDatabaseInit removed (resolving the collapse TODO); single boxed lbugDatabaseInitExtended.
  • lbug_java.cpp: unboxes with null checks, applies only non-null values onto lbug_default_system_config() (which it already started from).

Unset settings follow engine-side default changes automatically (e.g. LadybugDB/ladybug#1435 needs no binding change). Explicitly passed values behave exactly as before.

BREAKING CHANGE: SystemConfig fields changed from primitives to boxed types; the lbugDatabaseInit native was removed.

Stop pinning a copy of every engine default in this binding. SystemConfig
fields are now boxed (Long/Boolean) defaulting to null, meaning "use the
engine default". The JNI layer starts from lbug_default_system_config()
and only applies non-null values. The legacy lbugDatabaseInit native is
removed; its callers now pass nulls for fields the overload predates.

Unset settings follow engine-side default changes automatically (e.g.
LadybugDB/ladybug#1435's enable_multi_writes flip needs no binding
change). Explicitly passed values behave exactly as before.

BREAKING CHANGE: SystemConfig fields changed from primitives to boxed
types; the lbugDatabaseInit native was removed.
@adsharma adsharma changed the title feat!: let the engine control SystemConfig defaults feat(config): let the engine control SystemConfig defaults Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant