LogicBlox 4.3.12

Release Date: July 1st 2016

What's New

Database
  • Delta predicate revisions: the way that retractions are treated in LogiQL has changed in this release. In brief, retractions from functional predicates are now specified by key only, rather than by key and value. For example, -F[1]=2 becomes -F[1]=_. Please note that this is a breaking language change! The Upgrade Information gives an extensive overview on how to adapt to the new scheme.

    Reason for this change:

    • Under the covers, this has always been the semantics of retractions in LB 4.x. In 4.3.11 and earlier, given an EDB F with F[1]=1, if the user issued an exec -F[1]=2, the F[1]=1 fact will be retracted. By requiring that users now write -F[1]=_, we bring the syntax in line with the underlying semantics of the runtime.

    • We avoid an opportunity for spurious functional dependency violations (FDVs) with conflicting retraction requests. For example, issuing -F[1]=2 and -F[1]=3 in the same transaction in 4.3.11 and earlier would yield an FDV, because the retraction requests were gathered in a predicate which was itself functional. In the revised scheme, retraction requests involve only keys and no FDVs are possible. It is now always true that retracting a fact that does not exist is not an error.

    Note

    Please review the Upgrade Information section on how to adapt to the new scheme.

  • The refmode value associated with an entity value is not supposed to be changed after the initial creation of an entity, but this was not enforced by the compiler until this release. The compiler now immediately gives a compilation error on retractions and upserts of refmode values.

Developer Tools
  • Cloud-store now supports downloading specific versions of a versioned S3 object with the --version-id option.

  • The lb popcount command now features a density option that shows what the percentage of non-default facts for default value predicates.

  • lb-server logging and daemonize changes:
    • The logging file option of lb-server now supports the value '-' to log to stdout (which only makes sense when not starting lb-server a daemon)

    • The lb server start command internally now uses the same initialization notification method as when running services using systemd.

      Note

      This internal change should not impact users, except when the LB_DEPLOYMENT_HOME setting is using a very long path name. The limit on the length of the path is now about 100 characters (the limit of Unix domain sockets). For longer paths an error will be reported.

    • The daemonize option has been removed from lb-server.config and can now only be specified as an option to lb server start.

      Note

      This generally should not impact users, except if users copied the full lb-server.config file to make modifications. This would result in the following error after updating LogicBlox: lb-server: daemonize option is deprecated and must be false. We recommend only overriding the necessary configuration settings to always pick up the right defaults after updating LogicBlox.

Measure Service
  • It is now possible to remove all the caching logic the measure service installs using lb measure-service admin clear-cached-logic. Removing the cache logic is useful when adjusting the measure service model without having to completely rebuild the workspace. This does, however, require that administrative measure service operations have been enabled.

  • The measure service now generates optimized logic for min and max aggregations over default values.

Workflow
  • The lb-workflow driver now supports push notifications. A driver configuration file can be used to set up filters over events that the driver can emit (e.g. driver startup, task start, task end, etc). A notifier can be setup to receive notifications when an event matches the filter. The following notifiers are currently supported: file notifier (where the events are dumped to a file) and Amazon SNS notifier.

Corrected Issues

The issues listed below have been corrected since the 4.3.11 release.

  • Changing the logging level online (using lb server loglevel) did not work when logging to journald.

  • The command lb server start did not correctly handle the logging file option from lb-server.config and would always use the default value. This has been fixed.

  • The command lb-server start did not correctly handle the option --daemonize false. This has been fixed.

  • Resolved an issue where the lb-workflow driver sometimes crashed, due to SimpleTasks not being cleaned up from the driver, causing excessive memory usage.

  • A potential race condition has been resolved in the Measure Service that could arise when using the administrative refresh command to reload measure service model definitions.

Installation and Upgrade information

Installation Instructions

Installing LogicBlox 4.3.12 is as simple as following the steps outlined below:

  1. Download the installation package.
  2. Extract the tarball in <YourPreferredInstallDirectory>
  3. Run the following command:
    source <YourPreferredInstallDirectory>/logicblox-4.3.12/etc/profile.d/logicblox.sh
    
    NOTE: this script will set all the necessary environment variables. You might want to add this command to your .bashrc.

Upgrade Information

How to adapt to the new scheme:

  • For retractions from functional predicates, just replace the value with an underscore.

    Example 17. 

    For example,

    -data[i]=w <- +remove(w), data@prev[i]=w.

    becomes

    -data[i]=_ <- +remove(w), data@prev[i]=w.

  • If a retraction atom -F[x]=y occurs in the body of a rule, and the semantics of the rule requires deriving facts only for specific values of y, then you may need to find a different way of binding the variable. Typically you can then use F@prev[x]=y to bind the variable.

    Example 18. 

    For example,

    +finished_subscription[store, sku, start]=end <-
      -active_subscription[store, sku]=start,
      week_less_or_equal(start, end),
      current_week[]=end.

    (note how start is needed) can be changed to

    +finished_subscription[store, sku, start]=end <-
      -active_subscription[store, sku]=_,
      active_subscription@prev[store, sku]=start,
      week_less_or_equal(start, end),
      current_week[]=end.

  • If replacing -F[x]=y with -F[x]=_ leaves only a single use of the variable y, then to avoid a variable solitary warning (or error, as configured by most projects) you may also need to modify the body to use an _ for an @prev predicate.

    Example 19. 

    For example,

    -effective[sku]=_ <-
      +new_clone(sku),
      effective@prev[sku]=date.

    becomes

    -effective[sku]=_ <-
      +new_clone(sku),
      effective@prev[sku]=_.

    Note that it is not an error to generate retraction requests for facts that do not exist, so depending on the desired semantics the effective@prev atom could also be entirely removed in this case.

  • For retractions from EDB entity types/constructors, do the retraction from the constructor, and rely on auto-retraction rules to retract from the type.

    Example 20. 

    For example,

    a(x), -a_from_string["foo"]=x.

    becomes

    -a_from_string["foo"]=_.

Release Information

Server requirements
Operating System: 64 bit Linux; OSX 10.10+ is supported for local development.
Java Runtime Environment 7, update 11 or higher
Python 2.7 or higher
CPU compatible with the corei7 architecture
Client requirements
Applications using modeler-js User Interface Components: Google Chrome
Requirements for applications using non-modeler-js components may vary per application.