LogicBlox 4.21.0

Release Date: March 17, 2020

What's New

LogicBlox 4.21.0 introduces the following enhancements:

  • Modeler
    • Added read-only support for displaying Datetime measures in Modeler. Datetime measures can be configured in the Modeler IDE.

      Example 1. 

      The following example shows the definition of a Datetime measure in Measures.csv for an application that is not being developed using the Modeler IDE:

      SkuDateAdded,SKU Date Added,Sku,datetime,,ambig,replicate,,,"{""output"":""datetime"",""datetime"":""MM/DD/YYYY h:mm:ss a""}",,,,,,

      The values of Datetime measures will be formatted by Modeler as defined in the measure format definition. In this example, the formatting is defined as MM/DD/YYYY h:mm:ss a. All supported formatting options can be found here.

  • Modeler IDE
    • Added configuration support for Datetime measures in the Modeler IDE. Create a Datetime measures by setting the value type to Datetime. Measure formatting options can be found here.

    • Added configuration support for installed locks in the new "Locks" view of the Modeler IDE. These locks are defined as CubiQL expressions that specify the keys that need to be locked (e.g. a level such as Day in the Calendar dimension when using this functionality for historical locking).

      Note that it's possible to use the measure explosion variable $$BASE (the base intersection of the measure to lock) in this CubiQL expression. This allows you to widen or refine the result of the CubiQL expression to the base intersection of the measure that needs to be locked.

      Example 2. 

      The following example shows the configuration of a historical lock that uses the measure explosion variable $$BASE to refine the positions in measure ElapsedWeek (with base intersection Week) to the base intersection of the measure that's being locked (e.g. Sku,Store,Week for a sales measure).

      The lock can be applied to measures in the "Measures" view:

      Example 3. 

      When you want to use the positions in a measure such as ElapsedWeek (with base intersection Week) to lock a measure which is keyed at a higher level in the Calender dimension (e.g. Sku,Store,Month), you can use the following CubiQL collect expression to determine the months that should be locked:

    • The Modeler IDE now runs warmups during the workbooks build. These warmups run on the workbook base branch before installing the workbook templates.

    • Measures with CubiQL expressions that have no inverses are now automatically marked as read-only by the Modeler IDE. This means these measures will not be editable in the Modeler application by default. In previous releases, marking these measures as read-only was the responsibility of the application developer.

  • Tools, Database, and Services
    • This release includes a new scheduler for task parallelism, which should reduce scheduling overhead in cases where there are many unrelated tasks to choose from while there are still tasks in-flight.

    • The lb-workflow JsonService task supports now the websocket protocol.

    • Added a MeasureServiceAdmin task to lb-workflow, supporting the commands refresh and clear-cached-logic. For example:

      lb.MeasureServiceAdmin(
        transport = "ws://localhost:55183",
         uri = "/starter_planning_app/workbook-wb_flgnbdkefid2tvfcnmnn5biv5g/websocket/measure",
      command = "refresh")
                      

    • Updated perf logging to include the number of updates to a predicate during the current transaction.

  • Measure service
    • Further improvements were made to error reporting about model versus workspace mismatches in predicate definitions during model completion.

    • Added support for named updates. It is now possible to give a name to a set of UpdateExprs in the measure model with an UpdateDef message. The named update can then be executed by using the named field of UpdateRequest.

      This change necessitated a small breaking change to the protocol. For more information, see the "Measure Service" section in the Upgrade Information section.

    • It is now possible to specify updates using textual syntax in requests via the str field of UpdateExpr. This was previously only possible in the CubiQL REPL. All the other fields of UpdateExpr are now optional and unnecessary when the str field is set.

    • Added a new optional field to the Predicate message in the protocol to specify the kind of predicate that should be used. The new field is kind, corresponding to the Predicate.Kind enum.

    • Added a new administrative recording option to aid us in diagnosing measure service issues. Recording can be toggled via the command-line with lb measure-service admin record --uri URI, via the CubiQL REPL with the :record directive., or via an administrative request to the measure service.

      By default the recordings will be placed within a directory with the same name as the workspace in /tmp. The parent directory for recordings can be adjusted by setting recording_dir in the lb-measure-service.config files.

    • Improved handling of CubiQL bound to named LogiQL predicates. We now track the binding state of predicates defined via CubiQL separately from the derivation type, which was fragile. It is now possible to easily clear the binding logic (and therefore change the CubiQL definition of metrics) via the command-line with lb measure-service admin clear-bindnings --uri URI, via a CubiQL REPL with the :clear-bindings directive, or via an administrative request to the measure service.

      We also introduced a new performance warning for when there is a mismatch between the signature for the defining CubiQL and the predicate to which it is being bound. It is very important to resolve these warnings as they indicate that your application is taking up more storage space than required and taking longer for views to be computed.

    • Improved error reporting of file system problems when generating separately compiled projects from model JSON.

    • A number of optimizations greatly reduce the latency of many kinds of measure requests.

Corrected Issues

The issues listed below have been corrected since the 4.20.0 release:

  • Modeler
    • The generateviewwarmupqueries.js no longer throws a TypeError when the model contains a position only metric with an inverse CubiQL expression.

  • Modeler IDE
    • Fixed an issue in the build process which caused "Update" to fail.

    • Fixed an issue where deleting a measure could cause a previously succeeding build to fail.

    • Fixed an issue in the input validation when creating new templates in the "Workbook Templates" view.

    • When the view warmup fails during the build of a Modeler IDE project, the output of the measure service is now included in the build log found in the "Build" view.

    • The Modeler IDE now correctly filters the list of options based on the user's search string when selecting the measure to update for an inverse.

      Example 4. 

      For instance, when searching for $Sales_R it will show all possibilities covered by this selection including $Sales_R itself:

    • The "Workbook Template" view didn't allow the user to discard a new template with the "Cancel" option during creation. Also, when the user navigated away from the "Workbook Template" no dialog was shown to warn the user that unsaved data will be lost. This has been fixed now.

    • The "Intersections" view now shows the configured label instead of the internal UUID of an intersection when the user hovers the mouse above the "Intersection" column.

    • Fixed an issue where deleting a level from an ordered dimension (e.g. Calendar) could cause a previously succeeding build to fail.

    • Fixed an issue where adding a Format override would cause invalid global validation errors.

    • Fixed an issue in the "Measures" view when opening the preview of the derived measures of a measure variant with no intersection.

    • Resolved some rendering issues in the header of the "Measure Components" view. The view now renders fine in all window sizes.

  • Tools, Database, and Services
    • Fixed an issue that could cause cloud-store to lock up when downloading files from Google Cloud Store.

    • Fixed minor cloud-store robustness issues that caused stack dumps when running the list-buckets command and with the --dry-run option when used with Google Cloud Store.

    • Improved the performance of trace visualization when using the LogicBlox tracing tools.

    • Updated the systemd socket activation support used by lb-web-server to allow it to work with OpenJDK version 8 build 242 and later.

    • Adjusted our handling of default value rules to allow optimizing for the constant time case of default-value copy rules.

    • Fixed a long-standing corner case with the internal rules generated when it is necessary to materialize the inlined views in the body of an aggregation or P2P.

Known Issues

The issues listed below are known to exist in the 4.21.0 release.

  • Tools, Database, and Services
    • This release contains changes to some lb-workflow tasks related to workbook creation. These fixes have not been applied yet to lb.wb.CreateWorkbook, which means errors related to recent changes in the LB runtime that imposes restrictions on string lengths can still occur. Please note that this known issue does apply to lb.wb.util.CreateWorkbook.

Installation Information

Install LogicBlox 4.21.0 by following the steps outlined below:

  1. Download the LogicBlox installation package for Linux or macOS from the LogicBlox developer website.
  2. Extract the tarball into a directory, which we refer to as <LOGICBLOX_HOME>.
  3. Run the following commands:
    source <LOGICBLOX_HOME>/etc/profile.d/logicblox.sh
    source <LOGICBLOX_HOME>/etc/bash_completion.d/logicblox.sh
    NOTE: these scripts automatically set all the necessary environment variables (please be aware that this script only works if you use bash as your shell). You might want to add these commands to your .bashrc.

Upgrade Information

  • Modeler
    • The library containing the Modeler migration tool is included in the distribution under <LOGICBLOX_HOME>/lib/npm/modeler-migrations-<VERSION>.tgz and contains a command line tool for doing various transformations/migrations of modeler configurations.

      To use the npm module, you first need to install it by running npm install <LOGICBLOX_HOME>/lib/npm/modeler-migrations-<VERSION>.tgz. You will then be able to use the command line tool. The module contains a README.md file that lists all available transformations as well as detailed instructions for use.

      To automatically upgrade a Modeler application from one version to another, run the upgrade script to upgrade between versions:

      ./node_modules/.bin/migrate-modeler --fromVersion <prevVer> --toVersion <toVer> /path/to/my/modelerapp

      where the version numbers refer to LogicBlox releases (e.g. 4.21.0).

      NOTE: If you installed the npm module globally, you won't need the ./node_modules/.bin prefix on the command.

  • Measure service
    • The introduction of named updates necessitated a small breaking change to the protocol. The UpdateRequest message no longer has an input field. This field has been moved inside UpdateExpr. The expr field of UpdateRequest is now repeated, so it needs to be passed as a collection.

Release Information

  • Server requirements
    • Operating System: 64-bit Linux; Apple macOS 10.10+ is supported for local development
    • Java Runtime Environment 8, update 101 or higher
    • Python 3.5 or higher
  • Client requirements
    • Applications using LogicBlox Modeler: Modeler supports major browsers not older than 1 year. Google Chrome provides the best performance.
    • Requirements for applications using non-LogicBlox Modeler components may vary per application.